From a17a4b49b76ae7be5674787cddd1071dc1776e72 Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Tue, 28 Sep 2010 01:53:44 +0100 Subject: [PATCH 1/1] Handle various filename extensions that people use with markdown. --- markdown-plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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): -- 2.39.5