md = markdown.Markdown(
#safe_mode=True,
output_format='html4',
- extensions=[ #'codehilite', # Requires python-pygments
- 'extra',
- #'html_tidy', # Requires libtidy and uTidylib
- #'imagelinks', # Broken?
- #'meta',
- #'rss',
- #'toc',
- #'wikilinks'
- ]
+ extensions=[ 'extra',]
)
def cb_entryparser(args):
return parse(''.join(args['story']))
def parse(story):
- # Convert the ASCII text to HTML with python-markdown.
html = md.convert(story)
- # Reset python-markdown ready for next time.
md.reset()
return html