Skip to content

This is an Emscripten port of the C reference implementation of CommonMark, cmark.

License

Notifications You must be signed in to change notification settings

mvasilkov/cmark-emscripten

Repository files navigation

cmark-emscripten

This is an Emscripten port of the C reference implementation of CommonMark, cmark.

cmark-emscripten can be used in Node.js and the browser.

Installation

yarn add cmark-emscripten

Usage

const cmark = require('cmark-emscripten')

cmark.toHTML(`
What do you call a basement full of liberals?
---

*A whine cellar.*
`).then(console.log)

Outputs:

<h2>What do you call a basement full of liberals?</h2>
<p><em>A whine cellar.</em></p>