marked-prismjs-linenumber 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/readme.md +7 -7
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# marked-
|
|
1
|
+
# marked-prismjs-linenumber
|
|
2
2
|
|
|
3
3
|
> A [marked](https://marked.js.org/) renderer that highlights Markdown code blocks with [Prism.js](https://prismjs.com/) and renders line numbers — just like the `line-numbers` plugin, but produced straight from the Markdown parser.
|
|
4
4
|
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
npm install marked-
|
|
11
|
+
npm install marked-prismjs-linenumber
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Or with pnpm / yarn:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
pnpm add marked-
|
|
18
|
-
yarn add marked-
|
|
17
|
+
pnpm add marked-prismjs-linenumber
|
|
18
|
+
yarn add marked-prismjs-linenumber
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
You also need `marked` and `prismjs`:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm install marked prismjs marked-
|
|
24
|
+
npm install marked prismjs marked-prismjs-linenumber
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Required styles
|
|
@@ -46,7 +46,7 @@ npm install marked prismjs marked-prism-linenumber
|
|
|
46
46
|
|
|
47
47
|
```js
|
|
48
48
|
import { marked } from 'marked';
|
|
49
|
-
import { renderer, init } from 'marked-
|
|
49
|
+
import { renderer, init } from 'marked-prismjs-linenumber';
|
|
50
50
|
|
|
51
51
|
// Optional: preload Prism grammars you need.
|
|
52
52
|
// Anything not loaded falls back to escaped plain text.
|
|
@@ -108,7 +108,7 @@ A `marked` renderer object exposing a single `code({ text, lang })` method. Pass
|
|
|
108
108
|
|
|
109
109
|
```js
|
|
110
110
|
import { marked } from 'marked';
|
|
111
|
-
import { renderer } from 'marked-
|
|
111
|
+
import { renderer } from 'marked-prismjs-linenumber';
|
|
112
112
|
|
|
113
113
|
marked.use({ renderer });
|
|
114
114
|
```
|