Karthik Prakash b8adee7f7c
feat: add --no-clobber option to CLI (#3025)
Co-authored-by: skoriop <karthikp.ivy@gmail.com>
Co-authored-by: Steven <steven@ceriously.com>
2023-10-04 20:05:55 -06:00
2023-08-19 16:55:56 -06:00
2022-10-30 20:26:36 -05:00
2023-09-21 08:11:44 -06:00
2023-09-16 17:24:06 -06:00
2018-04-05 11:36:07 -04:00
2019-11-05 15:31:11 -06:00
2023-09-09 17:51:42 -06:00
2021-11-02 09:40:27 -05:00
2021-11-02 09:32:17 -05:00
2021-11-02 09:32:17 -05:00
2023-07-29 00:31:34 -06:00
2023-08-09 23:33:46 -06:00
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)

Description
A markdown parser and compiler. Built for speed.
Readme 18 MiB
Languages
JavaScript 35%
TypeScript 35%
HTML 30%