code: def markdown(text, html=False, valid_tags=GFM_TAGS):
      
      if text is None:
          return None
      if html:
          return Markup(sanitize_html(markdown_convert_html(gfm(text)), valid_tags=valid_tags))
      else:
          return Markup(markdown_convert_text(gfm(text)))
docs: Return Markdown rendered text using GitHub Flavoured Markdown,
      with HTML escaped and syntax-highlighting enabled.