semantic-release-bot cdbdc0122a chore(release): 18.1.1 [skip ci]
## [18.1.1](https://github.com/markedjs/marked/compare/v18.1.0...v18.1.1) (2026-10-12)

### Bug Fixes

* **cli:** honor an explicitly empty string input ([#4113](https://github.com/markedjs/marked/issues/4113)) ([ec3a4e5](https://github.com/markedjs/marked/commit/ec3a4e511aa0d60b3e9ab8aa0c769407cdaf08d9))
* end blockquote before a lazy line after a heading, hr or html block ([#4115](https://github.com/markedjs/marked/issues/4115)) ([9e64a6a](https://github.com/markedjs/marked/commit/9e64a6a3fe6b826d113fc337c21ebe345455a842))
* keep a backslash in a code span from hiding emphasis ([#4117](https://github.com/markedjs/marked/issues/4117)) ([6a57018](https://github.com/markedjs/marked/commit/6a57018fc906333d358981682fd693e4bb85940f))
* keep a decoded character reference from forming a new one ([#4111](https://github.com/markedjs/marked/issues/4111)) ([6bbac0c](https://github.com/markedjs/marked/commit/6bbac0cdb72cc3038baefe768c03f788e46126a5)), closes [#38](https://github.com/markedjs/marked/issues/38) [#112](https://github.com/markedjs/marked/issues/112)
* let indented and type 3-5 html blocks interrupt a paragraph ([#4124](https://github.com/markedjs/marked/issues/4124)) ([eaa1fff](https://github.com/markedjs/marked/commit/eaa1fffb30fa334cc11ab93f1e5aaa1d2b916e7c))
* make walkTokens linear by appending values in place ([#4121](https://github.com/markedjs/marked/issues/4121)) ([627d9ae](https://github.com/markedjs/marked/commit/627d9ae4e5ea403580782a8f6e21fbc8bf56f4c1)), closes [#4120](https://github.com/markedjs/marked/issues/4120)
* match pre, script, style and textarea as whole tag names ([#4114](https://github.com/markedjs/marked/issues/4114)) ([0db74cb](https://github.com/markedjs/marked/commit/0db74cb0194f3acb5a53b14a73c2cd087c3c9981))
* preserve enclosing link state after parsing images ([#4123](https://github.com/markedjs/marked/issues/4123)) ([cc07bb9](https://github.com/markedjs/marked/commit/cc07bb9cb62bfd41a724d0a426f194188d7b35c1))
* respect tab stops in list continuation indentation ([#4119](https://github.com/markedjs/marked/issues/4119)) ([4bd2528](https://github.com/markedjs/marked/commit/4bd252811fb24ca6b7e22f60c39b89efc2b265d2))

### Performance Improvements

* avoid repeated raw string copies in nested lists ([#4082](https://github.com/markedjs/marked/issues/4082)) ([7e8754d](https://github.com/markedjs/marked/commit/7e8754d60b3c37be30aa17106ada623d1f0cf9db))
2026-10-12 12:28:42 +00:00
2018-04-05 11:36:07 -04:00
2021-11-02 09:40:27 -05:00
2026-10-12 08:27:31 -04:00
2026-10-12 12:28:42 +00:00
2023-08-09 23:33:46 -06:00
2020-08-29 17:55:07 -04:00

Marked

npm install size downloads github actions snyk inspect.software

  • ⚡ 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
  • 🛠️ easily adaptable with custom extensions
  • 🌐 works in a browser, on a server, or from a command line interface (CLI)

Demo

Check out 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: Baseline Widely Available

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

Node.js

import { marked } from 'marked';
const html = marked.parse('# Marked in Node.js');
console.log(html);

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/lib/marked.umd.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) 2018+, MarkedJS. (MIT License) Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)

S
Description
Lustro github.com/markedjs/marked
Readme Multiple Licenses
22 MiB
Languages
TypeScript 37.1%
JavaScript 36.6%
HTML 26.3%