From: Sean Hammond Date: Tue, 28 Sep 2010 00:53:44 +0000 (+0100) Subject: Handle various filename extensions that people use with markdown. X-Git-Url: https://projects.mako.cc/source/pyblosxom-markdown2/commitdiff_plain/a17a4b49b76ae7be5674787cddd1071dc1776e72?hp=11c9c6437a3a6bd63a14fec46da1f371d45bc8c1 Handle various filename extensions that people use with markdown. --- diff --git a/markdown-plugin.py b/markdown-plugin.py index 522823d..3224c63 100644 --- a/markdown-plugin.py +++ b/markdown-plugin.py @@ -38,7 +38,7 @@ USA. """ PREFORMATTER_ID = 'markdown' -FILE_EXT = 'mkdn' +FILENAME_EXTENSIONS = ('txt','text','mkdn','markdown','md','mdown','markdn','mkd') _version__ = '0.2' __author__ = 'Benjamin Mako Hill ' __author__ = 'seanh' @@ -63,7 +63,8 @@ md = markdown.Markdown( ) def cb_entryparser(args): - args[FILE_EXT] = readfile + for FILENAME_EXTENSION in FILENAME_EXTENSIONS: + args[FILENAME_EXTENSION] = readfile return args def cb_preformat(args):