def convert_markdown(doc, meta):
 for field in meta.fields:
  if (field.fieldtype == u'Text Editor'):
   value = doc.get(field.fieldname)
   if (value and (u'<!-- markdown -->' in value)):
    doc.set(field.fieldname, markdown(value))

def convert_markdown ( doc , meta ) : for field in meta . fields : if ( field . fieldtype == u'Text Editor' ) : value = doc . get ( field . fieldname ) if ( value and ( u'<!-- markdown -->' in value ) ) : doc . set ( field . fieldname , markdown ( value ) )
convert the markdown source file to html as per the config and site_navigation .