#NEWLINE# def render( self , context ) : #NEWLINE# #INDENT# obj = self . obj . resolve ( context ) #NEWLINE# t = template . Template ( obj . content ) #NEWLINE# content = t . render ( template . Context ( context ) ) #NEWLINE# if obj . markup : #NEWLINE# #INDENT# from niwi.contrib.markdown2 import markdown #NEWLINE# extensions = { #NEWLINE# #INDENT# 'code-color' : { #NEWLINE# #INDENT# 'style' : 'trac' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# content = markdown ( force_unicode ( obj ) , extras = extensions ) #NEWLINE# #UNINDENT# return mark_safe ( content )