marked
A markdown parser built for speed
Last updated 13 years ago by chjj .
Repository · Bugs · Original npm · Tarball · package.json
$ npm install marked 
SYNC missed versions from official npm registry.

Marked

npm gzip size install size downloads github actions snyk

  • ⚡ built for speed
  • ⬇️ low-level compiler for parsing markdown without caching or blocking for long periods of time
  • ⚖️ light-weight while implementing all markdown features from the supported flavors & specifications
  • 🌐 works in a browser, on a server, or from a command line interface (CLI)

Demo

Checkout the demo page to see marked in action ⛹️

Docs

Our documentation pages are also rendered using marked 💯

Also read about:

Compatibility

Node.js: Only current and LTS Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time.

Browser: Not IE11 :)

Installation

CLI:

npm install -g marked

In-browser:

npm install marked

Usage

Warning: 🚨 Marked does not sanitize the output HTML. Please use a sanitize library, like DOMPurify (recommended), sanitize-html or insane on the output HTML! 🚨

DOMPurify.sanitize(marked.parse(`<img src="x" onerror="alert('not happening')">`));

CLI

# Example with stdin input
$ marked -o hello.html
hello world
^D
$ cat hello.html
<p>hello world</p>
# Print all options
$ marked --help

Browser

<!doctype html>
<html>
<head>
  <meta charset="utf-8"/>
  <title>Marked in the browser</title>
</head>
<body>
  <div id="content"></div>
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
  <script>
    document.getElementById('content').innerHTML =
      marked.parse('# Marked in the browser\n\nRendered by **marked**.');
  </script>
</body>
</html>

or import esm module

<script type="module">
  import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js";
  document.getElementById('content').innerHTML =
    marked.parse('# Marked in the browser\n\nRendered by **marked**.');
</script>

License

Copyright (c) 2011-2022, Christopher Jeffrey. (MIT License)

Current Tags

  • 14.1.3                                ...           latest (a month ago)

179 Versions

  • 14.1.3                                ...           a month ago
  • 14.1.2                                ...           2 months ago
  • 14.1.1                                ...           2 months ago
  • 14.1.0                                ...           3 months ago
  • 14.0.0                                ...           3 months ago
  • 13.0.3                                ...           4 months ago
  • 13.0.2                                ...           4 months ago
  • 13.0.1                                ...           5 months ago
  • 13.0.0                                ...           5 months ago
  • 12.0.2                                ...           7 months ago
  • 12.0.1                                ...           8 months ago
  • 12.0.0                                ...           9 months ago
  • 11.2.0                                ...           10 months ago
  • 11.1.1                                ...           10 months ago
  • 11.1.0                                ...           a year ago
  • 11.0.1                                ...           a year ago
  • 11.0.0                                ...           a year ago
  • 10.0.0                                ...           a year ago
  • 9.1.6                                ...           a year ago
  • 9.1.5                                ...           a year ago
  • 9.1.4                                ...           a year ago
  • 9.1.3                                ...           a year ago
  • 9.1.2                                ...           a year ago
  • 9.1.1                                ...           a year ago
  • 9.1.0                                ...           a year ago
  • 9.0.3                                ...           a year ago
  • 9.0.2                                ...           a year ago
  • 9.0.1                                ...           a year ago
  • 9.0.0                                ...           a year ago
  • 8.0.1                                ...           a year ago
  • 8.0.0                                ...           a year ago
  • 7.0.5                                ...           a year ago
  • 7.0.4                                ...           a year ago
  • 7.0.3                                ...           a year ago
  • 7.0.2                                ...           a year ago
  • 7.0.1                                ...           a year ago
  • 7.0.0                                ...           a year ago
  • 6.0.0                                ...           a year ago
  • 5.1.2                                ...           a year ago
  • 5.1.1                                ...           a year ago
  • 5.1.0                                ...           a year ago
  • 5.0.5                                ...           a year ago
  • 5.0.4                                ...           a year ago
  • 5.0.3                                ...           a year ago
  • 5.0.2                                ...           2 years ago
  • 5.0.1                                ...           2 years ago
  • 5.0.0                                ...           2 years ago
  • 4.3.0                                ...           2 years ago
  • 4.2.12                                ...           2 years ago
  • 4.2.11                                ...           2 years ago
  • 4.2.10                                ...           2 years ago
  • 4.2.9                                ...           2 years ago
  • 4.2.8                                ...           2 years ago
  • 4.2.7                                ...           2 years ago
  • 4.2.6                                ...           2 years ago
  • 4.2.5                                ...           2 years ago
  • 4.2.4                                ...           2 years ago
  • 4.2.3                                ...           2 years ago
  • 4.2.2                                ...           2 years ago
  • 4.2.1                                ...           2 years ago
  • 4.2.0                                ...           2 years ago
  • 4.1.1                                ...           2 years ago
  • 4.1.0                                ...           2 years ago
  • 4.0.19                                ...           2 years ago
  • 4.0.18                                ...           2 years ago
  • 4.0.17                                ...           2 years ago
  • 4.0.16                                ...           2 years ago
  • 4.0.15                                ...           3 years ago
  • 4.0.14                                ...           3 years ago
  • 4.0.13                                ...           3 years ago
  • 4.0.12                                ...           3 years ago
  • 4.0.11                                ...           3 years ago
  • 4.0.10                                ...           3 years ago
  • 4.0.9                                ...           3 years ago
  • 4.0.8                                ...           3 years ago
  • 4.0.7                                ...           3 years ago
  • 4.0.6                                ...           3 years ago
  • 4.0.5                                ...           3 years ago
  • 4.0.4                                ...           3 years ago
  • 4.0.3                                ...           3 years ago
  • 4.0.2                                ...           3 years ago
  • 4.0.1                                ...           3 years ago
  • 4.0.0                                ...           3 years ago
  • 3.0.8                                ...           3 years ago
  • 3.0.7                                ...           3 years ago
  • 3.0.6                                ...           3 years ago
  • 3.0.5                                ...           3 years ago
  • 3.0.4                                ...           3 years ago
  • 3.0.3                                ...           3 years ago
  • 3.0.2                                ...           3 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.1.3                                ...           3 years ago
  • 2.1.2                                ...           3 years ago
  • 2.1.1                                ...           3 years ago
  • 2.1.0                                ...           3 years ago
  • 2.0.7                                ...           3 years ago
  • 2.0.6                                ...           3 years ago
  • 2.0.5                                ...           3 years ago
  • 2.0.4                                ...           3 years ago
  • 2.0.3                                ...           4 years ago
  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.2.9                                ...           4 years ago
  • 1.2.8                                ...           4 years ago
  • 1.2.7                                ...           4 years ago
  • 1.2.6                                ...           4 years ago
  • 1.2.5                                ...           4 years ago
  • 1.2.4                                ...           4 years ago
  • 1.2.3                                ...           4 years ago
  • 1.2.2                                ...           4 years ago
  • 1.2.1                                ...           4 years ago
  • 1.1.2                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           5 years ago
  • 0.8.2                                ...           5 years ago
  • 0.8.1                                ...           5 years ago
  • 0.8.0                                ...           5 years ago
  • 0.7.0                                ...           5 years ago
  • 0.6.3                                ...           5 years ago
  • 0.6.2                                ...           6 years ago
  • 0.6.1                                ...           6 years ago
  • 0.6.0                                ...           6 years ago
  • 0.5.2                                ...           6 years ago
  • 0.5.1                                ...           6 years ago
  • 0.5.0                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.19                                ...           7 years ago
  • 0.3.18                                ...           7 years ago
  • 0.3.17                                ...           7 years ago
  • 0.3.16                                ...           7 years ago
  • 0.3.15                                ...           7 years ago
  • 0.3.14                                ...           7 years ago
  • 0.3.13                                ...           7 years ago
  • 0.3.12                                ...           7 years ago
  • 0.3.9                                ...           7 years ago
  • 0.3.7                                ...           7 years ago
  • 0.3.6                                ...           8 years ago
  • 0.3.5                                ...           9 years ago
  • 0.3.4                                ...           9 years ago
  • 0.3.3                                ...           10 years ago
  • 0.3.2                                ...           11 years ago
  • 0.3.1                                ...           11 years ago
  • 0.3.0                                ...           11 years ago
  • 0.2.10                                ...           11 years ago
  • 0.2.9                                ...           11 years ago
  • 0.2.8                                ...           12 years ago
  • 0.2.7                                ...           12 years ago
  • 0.2.6                                ...           12 years ago
  • 0.2.5                                ...           13 years ago
  • 0.2.4-1                                ...           13 years ago
  • 0.2.4                                ...           13 years ago
  • 0.2.3                                ...           13 years ago
  • 0.2.2-1                                ...           13 years ago
  • 0.2.2                                ...           13 years ago
  • 0.2.1                                ...           13 years ago
  • 0.2.0                                ...           13 years ago
  • 0.1.9                                ...           13 years ago
  • 0.1.8                                ...           13 years ago
  • 0.1.7                                ...           13 years ago
  • 0.1.6                                ...           13 years ago
  • 0.1.5                                ...           13 years ago
  • 0.1.4                                ...           13 years ago
  • 0.1.3                                ...           13 years ago
  • 0.1.2                                ...           13 years ago
  • 0.1.1                                ...           13 years ago
  • 0.1.0                                ...           13 years ago
  • 0.0.9                                ...           13 years ago
  • 0.0.8                                ...           13 years ago
  • 0.0.7                                ...           13 years ago
  • 0.0.6                                ...           13 years ago
  • 0.0.5                                ...           13 years ago
  • 0.0.4                                ...           13 years ago
  • 0.0.3                                ...           13 years ago
  • 0.0.2                                ...           13 years ago
  • 0.0.1                                ...           13 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE