Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
High-speed spec-compliant Markdown parser and renderer written in Rust and compiled to WASM. Powered by the comrak crate under the hood. Supported everywhere.
Functions
Render Markdown to HTML.
Interfaces
Options to select extensions.
- autolink: boolean
Enables the autolink extension from the GFM spec.
- descriptionLists: boolean
Enables the description lists extension.
- footnotes: boolean
Enables the footnotes extension per cmark-gfm.
- frontMatterDelimiter: string | null
Enables the front matter extension.
- headerIDs: string | null
Enables the header IDs Comrak extension.
- strikethrough: boolean
Enables the strikethrough extension from the GFM spec.
- superscript: boolean
Enables the superscript Comrak extension.
- table: boolean
Enables the table extension from the GFM spec.
- tagfilter: boolean
Enables the tagfilter extension from the GFM spec.
- tasklist: boolean
Enables the task list items extension from the GFM spec.
Options for the markdownToHTML function.
Options for parser functions.
- defaultInfoString: string | null
The default info string for fenced code blocks.
- relaxedTasklistMatching: boolean
Whether or not a simple
xorXis used for tasklist or any other symbol is allowed. - smart: boolean
Punctuation (quotes, full-stops and hyphens) are converted into ‘smart’ punctuation.
Options for formatter functions.
- escape: boolean
Escape raw HTML instead of clobbering it.
- fullInfoString: boolean
Whether to use the full info string for fenced code blocks.
- githubPreLang: boolean
GitHub-style
<pre lang="xyz">is used for fenced code blocks with info tags. - hardbreaks: boolean
Soft line breaks in the input translate into hard line breaks in the output.
- listStyle: "dash" | "plus" | "star"
The style for list items.
- unsafe: boolean
Allow rendering of raw HTML and potentially dangerous links.
- width: number
The wrap column when outputting CommonMark.