X-Git-Url: https://projects.mako.cc/source/pyblosxom-markdown2/blobdiff_plain/ae0eaf9e2f180d93f65b13cef15caa26940c4af3..2185dce438bb38c425c5466e19b90c823644cd6c:/markdown-plugin.py diff --git a/markdown-plugin.py b/markdown-plugin.py index ed01d66..e8fa415 100644 --- a/markdown-plugin.py +++ b/markdown-plugin.py @@ -20,7 +20,7 @@ Now any posts with filenames ending in one of the FILENAME_EXTENSIONS defined below will be passed through python-markdown. Copyright (C) Benjamin Mako Hill, 2005 -Updated for python-markdown 2 by seanh 2009 +Updated for Python Markdown 2 by seanh 2009 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,26 +40,18 @@ USA. """ PREFORMATTER_ID = 'markdown' FILENAME_EXTENSIONS = ('txt','text','mkdn','markdown','md','mdown','markdn','mkd') -_version__ = '0.2' +_version__ = '0.3' __author__ = 'Benjamin Mako Hill ' __author__ = 'seanh ' -import re,codecs +import codecs import markdown from Pyblosxom import tools md = markdown.Markdown( #safe_mode=True, output_format='html4', - extensions=[ #'codehilite', # Requires python-pygments - 'extra', - #'html_tidy', # Requires libtidy and uTidylib - #'imagelinks', # Broken? - #'meta', - #'rss', - #'toc', - #'wikilinks' - ] + extensions=[ 'extra',] ) def cb_entryparser(args): @@ -72,9 +64,7 @@ def cb_preformat(args): return parse(''.join(args['story'])) def parse(story): - # Convert the ASCII text to HTML with python-markdown. html = md.convert(story) - # Reset python-markdown ready for next time. md.reset() return html