developit/snarkdown
developit/snarkdown has 2,403 GitHub stars and 115 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-06 21:53 UTC. Last push 2022-11-29.
:smirk_cat: A snarky 1kb Markdown parser written in JavaScript
What you can do
- Fast: since it's basically one regex and a huge if statement
- Tiny: it's 1kb of gzipped ES3
- Simple: pass a Markdown string, get back an HTML string
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
Snarkdown
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.
Features
- Fast: since it's basically one regex and a huge if statement
- Tiny: it's 1kb of gzipped ES3
- Simple: pass a Markdown string, get back an HTML string
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.
Demos & Examples
- ⚛️ Snarky - markdown editor built with Preact & Snarkdown
- ✏️ Simple Markdown Editor
Usage
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>.
Add-ons and Libraries
- For Webpack users,
snarkdown-loaderrenders markdown files to html.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,661 starspublic-apis/public-apis
A collective list of free APIs
496,906 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
439,905 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,108 stars