Created
September 28, 2010 01:51
-
-
Save seanh/600262 to your computer and use it in GitHub Desktop.
The PyBlosxom Python Markdown plugin as a preformatter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import markdown | |
| md = markdown.Markdown(output_format='html4',extensions=['extra',]) | |
| def cb_preformat(args): | |
| if args['parser'] == 'markdown': | |
| html = md.convert(''.join(args['story'])) | |
| md.reset() | |
| return html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment