This is a demo of https://github.com/github/cmark-gfm compiled to WebAssembly. Code is on GitHub at https://github.com/bolinfest/cmark-gfm/commits/wasm-demo.
These are the options exposed in cmark-gfm.h:
cmark-gfm.h
Include a data-sourcepos attribute on all block elements. OPT_SOURCEPOS
data-sourcepos
Render softbreak elements as hard line breaks. OPT_HARDBREAKS
softbreak
Render raw HTML and unsafe links (javascript:, vbscript:, file:, and data:, except for image/png, image/gif, image/jpeg, or image/webp mime types). By default, raw HTML is replaced by a placeholder HTML comment. Unsafe links are replaced by empty strings. OPT_UNSAFE
javascript:
vbscript:
file:
data:
image/png
image/gif
image/jpeg
image/webp
Render softbreak elements as spaces. OPT_NOBREAKS
Validate UTF-8 in the input before parsing, replacing illegal sequences with the replacement character U+FFFD. OPT_VALIDATE_UTF8
Convert straight quotes to curly, --- to em dashes, -- to en dashes. OPT_SMART
Use GitHub-style <pre lang="x"> tags for code blocks instead of <pre><code class="language-x">. OPT_GITHUB_PRE_LANG
<pre lang="x">
<pre><code class="language-x">
Be liberal in interpreting inline HTML tags. OPT_LIBERAL_HTML_TAG
Parse footnotes. OPT_FOOTNOTES
Only parse strikethroughs if surrounded by exactly 2 tildes. Gives some compatibility with redcarpet. OPT_STRIKETHROUGH_DOUBLE_TILDE
Use style attributes to align table cells instead of align attributes. OPT_TABLE_PREFER_STYLE_ATTRIBUTES
Include the remainder of the info string in code blocks in a separate attribute. OPT_FULL_INFO_STRING