UNPKG

1.07 kBMarkdownView Raw
1# Marked
2
3Marked is
4
51. built for speed.
62. a low-level markdown compiler that allows frequent parsing of large chunks of markdown without caching or blocking for long periods of time.
73. light-weight while implementing all markdown features from the supported flavors & specifications.
84. available as a command line interface (CLI) and running in client- or server-side JavaScript projects.
9
10## Installation
11
12**CLI:** `npm install -g marked`
13
14**In-browser:** `npm install marked --save`
15
16## Usage
17
18**CLI**
19
20``` bash
21$ marked -o hello.html
22hello world
23^D
24$ cat hello.html
25<p>hello world</p>
26```
27
28**Browser**
29
30```html
31<!doctype html>
32<html>
33<head>
34 <meta charset="utf-8"/>
35 <title>Marked in the browser</title>
36 <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
37</head>
38<body>
39 <div id="content"></div>
40 <script>
41 document.getElementById('content').innerHTML =
42 marked('# Marked in the browser\n\nRendered by **marked**.');
43 </script>
44</body>
45</html>
46```
47
48
49
50## License
51
52Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
53