Go to file
Jeremy Graziani 591ad80483
docs: Update authors link in SECURITY.md (#3013)
docs: Update Authors link in SECURITY.md
2023-09-28 07:32:42 -06:00
.devcontainer chore: add .devcontainer config (#2700) 2023-01-08 00:07:35 -06:00
.github chore(deps): Bump actions/checkout from 3 to 4 (#2969) 2023-09-04 09:22:02 -06:00
.vscode fix: fix more types (#2893) 2023-08-19 16:55:56 -06:00
api chore: update dingus (#2624) 2022-10-30 20:26:36 -05:00
bin fix: marked --help (#2991) 2023-09-18 11:37:43 -06:00
docs docs: fix typo in USING_PRO (#3000) 2023-09-21 08:11:44 -06:00
man fix: Clean up files in repo (#2963) 2023-09-09 17:51:42 -06:00
src fix: fix unicode emstrong (#2989) 2023-09-16 17:24:06 -06:00
test fix: fix unicode emstrong (#2989) 2023-09-16 17:24:06 -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 fix: Migrate to Typescript (#2805) 2023-07-29 00:31:34 -06:00
.gitattributes chore(git): mark lib/* as generated in .gitattributes (#2908) 2023-07-31 17:43:35 -04:00
.gitignore fix: Clean up files in repo (#2963) 2023-09-09 17:51:42 -06:00
.releaserc.json chore: rename release config 2021-11-02 09:40:27 -05:00
bower.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
LICENSE.md chore(docs): update versioning and other docs (#1834) 2020-11-18 14:20:03 -06:00
package-lock.json chore(deps-dev): Bump @typescript-eslint/eslint-plugin from 6.6.0 to 6.7.3 (#3009) 2023-09-25 22:46:30 -06:00
package.json chore(deps-dev): Bump @typescript-eslint/eslint-plugin from 6.6.0 to 6.7.3 (#3009) 2023-09-25 22:46:30 -06:00
README.md fix: Migrate to Typescript (#2805) 2023-07-29 00:31:34 -06:00
rollup.config.js chore: add version and copyright to marked.min.js (#2976) 2023-09-10 09:05:00 -06:00
SECURITY.md docs: Update authors link in SECURITY.md (#3013) 2023-09-28 07:32:42 -06:00
tsconfig-type-test.json fix: fix more types (#2893) 2023-08-19 16:55:56 -06:00
tsconfig-types.json fix: fix more types (#2893) 2023-08-19 16:55:56 -06:00
tsconfig.json fix: noImplicitAny: true (#2891) 2023-08-09 23:33:46 -06:00
vercel.json Use cleanUrls 2020-08-29 17:55:07 -04:00

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

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)