Skip to main content

API Reference

Renderers

Convert Markdown to various output formats

markdown_to_html()

Parse CommonMark/GFM and render as HTML.

markdown_to_latex()

Parse CommonMark/GFM and render as LaTeX.

markdown_to_man()

Parse CommonMark/GFM and render as a groff man page.

markdown_to_commonmark()

Parse CommonMark/GFM and render back as normalized CommonMark.

markdown_to_xml()

Parse CommonMark/GFM and render as XML.

markdown_to_plaintext()

Parse CommonMark/GFM and render as plain text.

Options

Parsing and rendering configuration

Options

CommonMark/GFM parsing and rendering options.

Parsing

Streaming parser, AST nodes, and tree traversal

Parser

Streaming CommonMark/GFM parser.

parse()

Parse a Markdown string and return the root AST node.

Node

A node in the CommonMark/GFM abstract syntax tree.

NodeType

CommonMark/GFM AST node types.

ListType

List type for LIST nodes.

DelimType

Delimiter type for ordered lists.

Utility

Package information

cmark_version()

Return the version string of the vendored cmark-gfm library.