A markdown parser and compiler. Built for speed.
 
 
 
Go to file
Ben McCann 4afb228d95
fix: Convert to ESM (#2227)
BREAKING CHANGE:

- Default export removed. Use `import { marked } from 'marked'` or `const { marked } = require('marked')` instead.
- `/lib/marked.js` removed. Use `/marked.min.js` in script tag instead.
- When using marked in a script tag use `marked.parse(...)` instead of `marked(...)`
2021-11-02 09:32:17 -05:00
.github chore(deps-dev): Bump semantic-release from 17.4.7 to 18.0.0 (#2208) 2021-09-20 14:39:53 -05:00
api Marked.js => Marked 2020-08-10 10:11:14 -04:00
bin fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
docs fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
lib fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
man fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
src fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
test fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05: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 Fix GitHub language via override 2018-02-15 11:28:53 -05:00
.gitignore Copy license to docs 2020-08-15 19:42:22 -04: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 fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -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 fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -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: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
package-lock.json fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
package.json fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
release.config.js chore: use semantic release (#1767) 2020-10-21 08:21:12 -05:00
rollup.config.esm.js fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05:00
rollup.config.js fix: Convert to ESM (#2227) 2021-11-02 09:32:17 -05: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

Usage

CLI

$ marked -o hello.html
hello world
^D
$ cat hello.html
<p>hello world</p>

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-2018, Christopher Jeffrey. (MIT License)