Cmark (cmark v0.10.0) View Source. Converts Markdown to supported target formats. All functions below support the following options::sourcepos - Include a data-sourcepos attribute on all block elements.:hardbreaks Render softbreak elements as hard line breaks.:nobreaks Render softbreak elements as spaces.
Instead, most markdown renderer which "supports" math syntax does it the naive (and problematic) way, which you can already do with pulldown-cmark: just render the markdown, then run KaTeX or MathJax on the output. This works okayish for very simple stuff, but you will quickly run into clashes where the math is interpreted as markdown.
Home; Getting Started; cmark. cmark is the C reference implementation of CommonMark, a rationalized version of Markdown syntax with a spec. (For the JavaScript reference implementation, see commonmark.js.) It provides a shared library (libcmark) with functions for parsing CommonMark documents to an abstract syntax tree (AST), manipulating the AST, and …
When using the pulldown-cmark's own HTML renderer, make sure to write to a buffered target like a Vec