Markdown processor

Markdown parser with a number of sane defaults that resembles GitHub-Flavoured Markdown (GFM).

GFM exists because normal markdown has some vicious gotchas. Further reading:

This Markdown processor is used by MarkdownColumn() to auto-render HTML from Markdown text.

coaster.utils.markdown.markdown(text: Optional[str], html: bool = False, linkify: bool = True, valid_tags: Union[List[str], Mapping[str, List[T]], None] = None, extensions: Optional[List[Union[str, markdown.extensions.Extension]]] = None, extension_configs: Optional[Mapping[str, Mapping[str, Any]]] = None) → Optional[markupsafe.Markup][source]

Markdown parser with a number of sane defaults that resemble GFM.

  • html (bool) – Allow known-safe HTML tags in text (this disables code syntax highlighting and task lists)
  • linkify (bool) – Whether to convert naked URLs into links
  • valid_tags (dict) – Valid tags and attributes if HTML is allowed
  • extensions (list) – List of Markdown extensions to be enabled
  • extension_configs (dict) – Config for Markdown extensions