/ moubarak.eu / node_modules / marked /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]bin/2 years ago -  
[DIR]lib/2 years ago -  
[DIR]man/2 years ago -  
[DIR]src/2 years ago -  
[TXT]LICENSE.md2 years ago2.9K 
[TXT]README.md2 years ago2.9K9b1f1b9 rm old utils [كارل مبارك]
[   ]marked.min.js2 years ago 48K 
[   ]package.json2 years ago2.7K2324c9f added npm start script [كارل مبارك]
README.md

Marked

npm gzip size install size downloads github actions snyk

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
npm install @types/marked # For TypeScript projects

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)

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80