A markdown parser and compiler. Built for speed.
 
 
 
Go to file
Tony Brix 79b8c0b838 fix: add version to build files 2023-01-13 20:42:59 -06:00
.devcontainer chore: add .devcontainer config (#2700) 2023-01-08 00:07:35 -06:00
.github fix: add version to build files 2023-01-13 20:42:59 -06:00
api chore: update dingus (#2624) 2022-10-30 20:26:36 -05:00
bin chore: added some jsdoc (#2418) 2022-03-30 10:42:54 -05:00
docs docs: Add marked-emoji to known extensions (#2693) 2023-01-01 21:29:23 -06:00
lib chore(ci): add version, unify output (#2701) 2023-01-13 20:27:58 -06:00
man fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
src fix: fix tabs at beginning of list items (#2679) 2022-12-23 09:39:10 -06:00
test fix: fix tabs at beginning of list items (#2679) 2022-12-23 09:39:10 -06:00
.editorconfig style 2018-04-05 11:36:07 -04:00
.eslintignore fix eslint config 2019-11-05 15:31:11 -06:00
.eslintrc.json chore(dev-deps): remove eslint-plugin-standard (#1849) 2020-11-22 23:19:28 -06:00
.gitattributes chore: avoid linefeed errors running on windows (#2277) 2021-11-11 08:06:54 -06:00
.gitignore Copy license to docs 2020-08-15 19:42:22 -04:00
.releaserc.json chore: rename release config 2021-11-02 09:40:27 -05:00
LICENSE.md chore(docs): update versioning and other docs (#1834) 2020-11-18 14:20:03 -06:00
Makefile fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
README.md docs: Info to install @types/marked for ts projects (#2577) 2022-09-12 08:15:41 -05:00
SECURITY.md Update SECURITY.md 2020-08-10 19:28:17 -05:00
bower.json fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
build-docs.js chore: added some jsdoc (#2418) 2022-03-30 10:42:54 -05:00
component.json fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
jasmine.json fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
marked.min.js fix: add version to build files 2023-01-13 20:42:59 -06:00
package-lock.json chore(deps-dev): Bump semantic-release from 19.0.5 to 20.0.2 (#2704) 2023-01-09 11:28:57 -06:00
package.json chore(deps-dev): Bump semantic-release from 19.0.5 to 20.0.2 (#2704) 2023-01-09 11:28:57 -06:00
rollup.config.js fix: add version to build files 2023-01-13 20:42:59 -06:00
vercel.json Use cleanUrls 2020-08-29 17:55:07 -04:00

README.md

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
npm install @types/marked # For TypeScript projects

Usage

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>

License

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