Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.
/ snarkdown Public archive
forked from developit/snarkdown

Snarkdown fork used for NLUX snapshot markdown rendering

License

Notifications You must be signed in to change notification settings

nlkitai/snarkdown

 
 

Repository files navigation

Snarkdown

Snarkdown npm

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

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

About

Snarkdown fork used for NLUX snapshot markdown rendering

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%