@bpmn-io/snarkdown
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

A fork of snarkdown with some fixes applied.

Snarkdown

Snarkdown npm Build Status

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 '@bpmn-io/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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.2.0
    1,042
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.2.0
    1,042
  • 2.1.0
    76
  • 2.0.1
    0

Package Sidebar

Install

npm i @bpmn-io/snarkdown

Weekly Downloads

1,118

Version

2.2.0

License

MIT

Unpacked Size

42.8 kB

Total Files

13

Last publish

Collaborators

  • vsgoulart
  • skaiir-camunda
  • marstamm
  • bpmn-io-admin
  • nikku
  • barmac
  • philippfromme
  • maxtru