]> projects.mako.cc - pyblosxom-markdown2/commitdiff
Handle various filename extensions that people use with markdown.
authorSean Hammond <seanhammond@lavabit.com>
Tue, 28 Sep 2010 00:53:44 +0000 (01:53 +0100)
committerSean Hammond <seanhammond@lavabit.com>
Tue, 28 Sep 2010 00:53:44 +0000 (01:53 +0100)
markdown-plugin.py

index 522823d843b7cfeaa854e75172e567c102093570..3224c6350b5366e20b10b7f328b38bf4c2fccf79 100644 (file)
@@ -38,7 +38,7 @@ USA.
 
 """
 PREFORMATTER_ID = 'markdown'
 
 """
 PREFORMATTER_ID = 'markdown'
-FILE_EXT = 'mkdn'
+FILENAME_EXTENSIONS = ('txt','text','mkdn','markdown','md','mdown','markdn','mkd')
 _version__ = '0.2'
 __author__ = 'Benjamin Mako Hill <mako@atdot.cc>'
 __author__ = 'seanh'
 _version__ = '0.2'
 __author__ = 'Benjamin Mako Hill <mako@atdot.cc>'
 __author__ = 'seanh'
@@ -63,7 +63,8 @@ md = markdown.Markdown(
 )
 
 def cb_entryparser(args):
 )
 
 def cb_entryparser(args):
-    args[FILE_EXT] = readfile
+    for FILENAME_EXTENSION in FILENAME_EXTENSIONS:
+        args[FILENAME_EXTENSION] = readfile
     return args
 
 def cb_preformat(args):
     return args
 
 def cb_preformat(args):

Benjamin Mako Hill || Want to submit a patch?