Go to file
dependabot[bot] 8182470455
chore(deps-dev): Bump rollup from 4.13.0 to 4.13.2 (#3247)
Bumps [rollup](https://github.com/rollup/rollup) from 4.13.0 to 4.13.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.13.0...v4.13.2)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 16:14:39 -06:00
.devcontainer
.github chore: fix tests in node v21 (#3209) 2024-03-04 08:05:38 -07:00
api
bin fix: Fix ENOENT error message in CLI (#3165) 2024-01-26 17:26:11 -07:00
docs docs: add marked-shiki to known extensions (#3197) 2024-02-19 10:30:44 -05:00
man feat: add --no-clobber option to CLI (#3025) 2023-10-04 20:05:55 -06:00
src fix: fix setext heading interupts (#3210) 2024-03-06 00:37:00 -07:00
test fix: fix setext heading interupts (#3210) 2024-03-06 00:37:00 -07:00
.editorconfig
.eslintignore fix: run spec tests with testutils (#3017) 2023-11-10 22:49:27 -07:00
.eslintrc.json
.gitattributes
.gitignore fix: run spec tests with testutils (#3017) 2023-11-10 22:49:27 -07:00
.releaserc.json
bower.json
CHANGELOG.md chore: add changelog that points to releases (#3207) 2024-03-01 22:30:34 -07:00
jasmine.json
LICENSE.md
package-lock.json chore(deps-dev): Bump rollup from 4.13.0 to 4.13.2 (#3247) 2024-04-01 16:14:39 -06:00
package.json chore(deps-dev): Bump rollup from 4.13.0 to 4.13.2 (#3247) 2024-04-01 16:14:39 -06:00
README.md docs: add docs for esm in browser (#3107) 2023-11-28 08:12:06 -07:00
rollup.config.js
SECURITY.md
tsconfig-type-test.json
tsconfig.json
vercel.json

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>

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)