😼 A snarky 1kb Markdown parser written in JavaScript
See the code
Snarkdown is a dead simple 1kb Markdown parser.
It's designed to be as minimal as possible, for constrained use-cases where a full Markdown parser would be inappropriate.
Note: Tables are not yet supported. If you love impossible to read regular expressions, submit a PR!
Note on XSS: Snarkdown doesn't sanitize HTML, since its primary target usage doesn't require it.
Snarkdown exports a single function, which parses a string of Markdown and returns a String of HTML. Couldn't be simpler.
The snarkdown module is available in every module format you'd ever need: ES Modules, CommonJS, UMD...
import snarkdown from 'snarkdown';
let md = '_this_ is **easy** to `use`.';
let html = snarkdown(md);
console.log(html);
// <em>this</em> is <strong>easy</strong> to <code>use</code>.
snarkdown-loader renders markdown files to html.Overall
Maintained
Code review
npm
Latest release
Releases this year
(top 24 of 37)
14,911 followers · starred Aug 2017
8,905 followers · starred Feb 2018
1,986 followers · starred May 2023
1,853 followers · starred Sep 2020
😼 A snarky 1kb Markdown parser written in JavaScript
See the code
Snarkdown is a dead simple 1kb Markdown parser.
It's designed to be as minimal as possible, for constrained use-cases where a full Markdown parser would be inappropriate.
Note: Tables are not yet supported. If you love impossible to read regular expressions, submit a PR!
Note on XSS: Snarkdown doesn't sanitize HTML, since its primary target usage doesn't require it.
Snarkdown exports a single function, which parses a string of Markdown and returns a String of HTML. Couldn't be simpler.
The snarkdown module is available in every module format you'd ever need: ES Modules, CommonJS, UMD...
import snarkdown from 'snarkdown';
let md = '_this_ is **easy** to `use`.';
let html = snarkdown(md);
console.log(html);
// <em>this</em> is <strong>easy</strong> to <code>use</code>.
snarkdown-loader renders markdown files to html.Overall
Maintained
Code review
npm
Latest release
Releases this year
(top 24 of 37)
14,911 followers · starred Aug 2017
8,905 followers · starred Feb 2018
1,986 followers · starred May 2023
1,853 followers · starred Sep 2020