Ejdjdososs/fable-ai
0
1<a href="https://marked.js.org">2 <img width="60px" height="60px" src="https://marked.js.org/img/logo-black.svg" align="right" />3</a>4 5# Marked6 7[](https://www.npmjs.com/package/marked)8[](https://cdn.jsdelivr.net/npm/marked/marked.min.js)9[](https://packagephobia.now.sh/result?p=marked)10[](https://www.npmjs.com/package/marked)11[](https://github.com/markedjs/marked/actions)12[](https://snyk.io/test/npm/marked)13 14- ⚡ built for speed15- ⬇️ low-level compiler for parsing markdown without caching or blocking for long periods of time16- ⚖️ light-weight while implementing all markdown features from the supported flavors & specifications17- 🌐 works in a browser, on a server, or from a command line interface (CLI)18 19## Demo20 21Checkout the [demo page](https://marked.js.org/demo/) to see marked in action ⛹️22 23## Docs24 25Our [documentation pages](https://marked.js.org) are also rendered using marked 💯26 27Also read about:28 29* [Options](https://marked.js.org/using_advanced)30* [Extensibility](https://marked.js.org/using_pro)31 32## Compatibility33 34**Node.js:** Only [current and LTS](https://nodejs.org/en/about/releases/) Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time.35 36**Browser:** Not IE11 :)37 38## Installation39 40**CLI:**41 42```sh43npm install -g marked44```45 46**In-browser:**47 48```sh49npm install marked50```51 52## Usage53 54### Warning: 🚨 Marked does not [sanitize](https://marked.js.org/using_advanced#options) the output HTML. Please use a sanitize library, like [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [sanitize-html](https://github.com/apostrophecms/sanitize-html) or [insane](https://github.com/bevacqua/insane) on the *output* HTML! 🚨55 56```57DOMPurify.sanitize(marked.parse(`<img src="x" onerror="alert('not happening')">`));58```59 60**CLI**61 62``` bash63# Example with stdin input64$ marked -o hello.html65hello world66^D67$ cat hello.html68<p>hello world</p>69```70 71```bash72# Print all options73$ marked --help74```75 76**Browser**77 78```html79<!doctype html>80<html>81<head>82 <meta charset="utf-8"/>83 <title>Marked in the browser</title>84</head>85<body>86 <div id="content"></div>87 <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>88 <script>89 document.getElementById('content').innerHTML =90 marked.parse('# Marked in the browser\n\nRendered by **marked**.');91 </script>92</body>93</html>94```95or import esm module96 97```html98<script type="module">99 import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js";100 document.getElementById('content').innerHTML =101 marked.parse('# Marked in the browser\n\nRendered by **marked**.');102</script>103```104 105## License106 107Copyright (c) 2011-2022, Christopher Jeffrey. (MIT License)108 