projects
/
pyblosxom-markdown2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added support for UTF-8 documents
[pyblosxom-markdown2]
/
markdown-plugin.py
diff --git
a/markdown-plugin.py
b/markdown-plugin.py
index f60b9a3c6975fa274f87321bf892ed6a9b73f42d..159744507d556f518c6469d40824a31230e0c213 100644
(file)
--- a/
markdown-plugin.py
+++ b/
markdown-plugin.py
@@
-27,7
+27,7
@@
_version__ = '0.3'
__author__ = 'Benjamin Mako Hill <mako@atdot.cc>'
__author__ = 'seanh <snhmnd@gmail.com>'
__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
import markdown
import os
@@
-37,6
+37,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:
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()
md.reset()
- return args
\ No newline at end of file
+ return args
Benjamin Mako Hill
||
Want to submit a patch?