12.0.2 • Published 2 months ago

marked v12.0.2

Weekly downloads
4,447,568
License
MIT
Repository
github
Last release
2 months ago

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)

@sinch/readme-syncwainwright@jcbhmr/md-html@cc-design/vite-plugin-cestc-vue-docs@spaceone/design-system@tencentcloud/chat-cs-vue@sleekcms/cms-snapshot-data@togajam/ezmd@ray.js/cli@dxatscale/sfpowerscripts@eui/deps-basearchetype-librarybpmn-studio@directus-asolole/api@grafana/datadocerdmd-jc@balena/jellyfish-plugin-front@c8y/ngx-components@carbon/ibmdotcom-services@carbon/ibmdotcom-utilities@onereach/ui-components@codeunic/svelte-ui@codecademy/gamut@thonlabs/docs@thonlabs/ui@atomist/sdm-local@knapsack/plugin-changelog-md@sooha/uikit@mathigon/parserlunzi-ui-11fitp@dineshghule321/nebularsquareboycreateviewkilli8n-react-native-fast-imagenightwatchjs.org@agendrix/redoc@stratosui/coregrunt-ngdocs-tmpbingo-platformbingo-platform1delon-hh@bonobolabs/firebase-tools-deploy-parallelism@yelloan/redoclxlibshared-react-scaffoldingspfa-theme-defaultmdviewer-iview@turtlemint/ui-componentsamar-logviewerscreen-spec-mdiview-editor-vvtoolmarkdown_viewer@allen0304/nebular@turtlemint/turtlemint-ui@rock-kit/ui-docs-clientmd-to-jsontreecolony-fixedkimiwikitoolbox-layoutjigi-clingx-markdown-katexautoml-templatemd-links-yasmitagent-interface@klizancorp/quiz-componentikea-kompis@moonwalker/lifesupportanna-express@ikangxu/i5ting_toc237-update-pagesimplemde-extendimpress-megraphql-playground-react-auth@ventusrisk/jslibmd-to-ditaredarkprimus-liveadhoq@helpscout/editortwohundredsambal-ssgplatformkit-generatorsphidostatic-view-blocksk1at3strowel-wikiepoosmind-storagesemo-plugin-starter-typescriptcaptain-corenebular_forked_version_three_point_fourdatocms-plugin-editor-help-testdoc-graphql-builderhandful@open-raven/react-styleguidesemo-plugin-repl-doc@teipublisher/pb-components7blili-ui
12.0.2

2 months ago

12.0.1

3 months ago

12.0.0

5 months ago

11.2.0

5 months ago

11.1.1

6 months ago

11.1.0

6 months ago

11.0.1

6 months ago

11.0.0

7 months ago

9.0.3

9 months ago

10.0.0

7 months ago

9.1.6

7 months ago

9.1.5

8 months ago

9.1.4

8 months ago

9.1.3

8 months ago

9.1.2

8 months ago

9.0.2

9 months ago

9.1.1

8 months ago

9.1.0

9 months ago

9.0.1

9 months ago

9.0.0

9 months ago

8.0.1

10 months ago

8.0.0

10 months ago

7.0.5

10 months ago

5.0.5

1 year ago

5.0.4

1 year ago

5.0.3

1 year ago

7.0.0

11 months ago

7.0.4

10 months ago

7.0.3

10 months ago

7.0.2

10 months ago

7.0.1

11 months ago

5.1.2

11 months ago

5.1.1

12 months ago

5.1.0

1 year ago

6.0.0

11 months ago

5.0.2

1 year ago

5.0.1

1 year ago

5.0.0

1 year ago

4.2.10

1 year ago

4.2.11

1 year ago

4.2.12

1 year ago

4.3.0

1 year ago

4.2.7

1 year ago

4.2.6

1 year ago

4.2.9

1 year ago

4.2.8

1 year ago

4.2.3

2 years ago

4.2.2

2 years ago

4.2.5

1 year ago

4.2.4

2 years ago

4.2.1

2 years ago

4.2.0

2 years ago

4.0.19

2 years ago

4.1.0

2 years ago

4.1.1

2 years ago

4.0.16

2 years ago

4.0.18

2 years ago

4.0.17

2 years ago

4.0.15

2 years ago

4.0.14

2 years ago

4.0.13

2 years ago

4.0.7

3 years ago

4.0.6

3 years ago

4.0.9

2 years ago

4.0.8

3 years ago

4.0.10

2 years ago

4.0.12

2 years ago

4.0.11

2 years ago

4.0.5

3 years ago

4.0.4

3 years ago

4.0.1

3 years ago

4.0.3

3 years ago

4.0.2

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

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.9

3 years ago

1.2.8

3 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

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 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

6 years ago

0.3.18

6 years ago

0.3.17

6 years ago

0.3.16

6 years ago

0.3.15

6 years ago

0.3.14

6 years ago

0.3.13

6 years ago

0.3.12

6 years ago

0.3.9

6 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

9 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.10

11 years ago

0.2.9

11 years ago

0.2.8

11 years ago

0.2.7

11 years ago

0.2.6

12 years ago

0.2.5

12 years ago

0.2.4-1

12 years ago

0.2.4

12 years ago

0.2.3

12 years ago

0.2.2-1

12 years ago

0.2.2

12 years ago

0.2.1

12 years ago

0.2.0

12 years ago

0.1.9

12 years ago

0.1.8

12 years ago

0.1.7

12 years ago

0.1.6

12 years ago

0.1.5

12 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