jack e1a2621c78 update | il y a 2 ans | |
---|---|---|
.. | ||
api | il y a 2 ans | |
bin | il y a 2 ans | |
docs | il y a 2 ans | |
lib | il y a 2 ans | |
man | il y a 2 ans | |
src | il y a 2 ans | |
.bower.json | il y a 2 ans | |
LICENSE.md | il y a 2 ans | |
Makefile | il y a 2 ans | |
README.md | il y a 2 ans | |
SECURITY.md | il y a 2 ans | |
bower.json | il y a 2 ans | |
build-docs.js | il y a 2 ans | |
component.json | il y a 2 ans | |
jasmine.json | il y a 2 ans | |
marked.min.js | il y a 2 ans | |
package-lock.json | il y a 2 ans | |
package.json | il y a 2 ans | |
rollup.config.esm.js | il y a 2 ans | |
rollup.config.js | il y a 2 ans | |
vercel.json | il y a 2 ans |
Checkout the demo page to see marked in action ⛹️
Our documentation pages are also rendered using marked 💯
Also read about:
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 :)
CLI: npm install -g marked
In-browser: npm install marked
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>
Copyright (c) 2011-2022, Christopher Jeffrey. (MIT License)