4a5b97071a4d

web: use some of the nifty markdown2 extensions
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 18 Jun 2010 23:05:28 -0400
parents 53acdea3cf0a
children 63630bb5a5d9
branches/tags (none)
files review/web.py

Changes

--- a/review/web.py	Fri Jun 18 23:04:40 2010 -0400
+++ b/review/web.py	Fri Jun 18 23:05:28 2010 -0400
@@ -52,6 +52,7 @@
              'no': len(filter(lambda s: s.opinion == 'no', signoffs)),
              'neutral': len(filter(lambda s: s.opinion == '', signoffs)),}
 
+markdowner = markdown2.Markdown(safe_mode='escape', extras=['code-friendly', 'pyshell', 'imgless'])
 utils = {
     'node_short': short,
     'md5': md5,
@@ -65,7 +66,7 @@
     'map': map,
     'str': str,
     'decode': lambda s: s.decode('utf-8'),
-    'markdown': markdown2.markdown,
+    'markdown': markdowner.convert,
 }
 
 def _render(template, **kwargs):