added GPL/license information back to file
[pyblosxom-markdown2] / markdown-plugin.py
index f60b9a3c6975fa274f87321bf892ed6a9b73f42d..ba46a6543582aaf42b51f18e8a57b25ca450f0f1 100644 (file)
@@ -19,15 +19,20 @@ this:
 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
-Rewritten by seanh 2009, 2010
+Copyright (C) 2005, 2011 Benjamin Mako Hill
+Copyright (c) 2009, 2010, seanh
+
+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
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 """
 _version__ = '0.3'
 __author__ = 'Benjamin Mako Hill <mako@atdot.cc>'
 __author__ = 'seanh <snhmnd@gmail.com>'
 
-FILENAME_EXTENSIONS = ('.txt','.text','.mkdn','.markdown','.md','.mdown','.markdn','.mkd')
+FILENAME_EXTENSIONS = ('.mdwn', '.txt','.text','.mkdn','.markdown','.md','.mdown','.markdn','.mkd')
 
 import markdown
 import os
@@ -37,6 +42,6 @@ md = markdown.Markdown(output_format='html4',extensions=['extra',])
 def cb_story(args):
        entry = args['entry']
        if os.path.splitext(entry['filename'])[1] in FILENAME_EXTENSIONS:
-               entry['body'] = md.convert(''.join(entry['body']))
+               entry['body'] = md.convert(u''.join(entry['body'].decode("utf-8")))
                md.reset()
-       return args
\ No newline at end of file
+       return args

Benjamin Mako Hill || Want to submit a patch?