@vmz/plugin-markdown-it 0.0.2 → 0.0.3
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/README.md +1 -1
- package/package.json +2 -2
- package/runtime.ts +5 -6
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vmz/plugin-markdown-it",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "VMZ markdown-it adapter — MarkdownIt + engines.markdown registration",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"./package.json": "./package.json"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@vmz/plugin": "0.0.
|
|
21
|
+
"@vmz/plugin": "0.0.3",
|
|
22
22
|
"markdown-it": "^14.1.0"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
package/runtime.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Deterministic CommonMark-ish subset for documents + `<Markdown>`
|
|
3
|
-
* HTML / JS / MDX disabled — see 规划设计/vmz/19 §3.
|
|
2
|
+
* Deterministic CommonMark-ish subset for documents + `<Markdown>` .
|
|
4
3
|
*/
|
|
5
4
|
import MarkdownIt from 'markdown-it';
|
|
6
5
|
|
|
@@ -30,10 +29,10 @@ export function renderMarkdown(source) {
|
|
|
30
29
|
/**
|
|
31
30
|
* @param {string} source
|
|
32
31
|
* @returns {{
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
32
|
+
* html: string,
|
|
33
|
+
* headings: Array<{ level: number, id: string, text: string }>,
|
|
34
|
+
* links: Array<{ href: string, text: string }>,
|
|
35
|
+
* fences: Array<{ lang: string, info: string, content: string, lineStart: number, lineEnd: number }>
|
|
37
36
|
* }}
|
|
38
37
|
*/
|
|
39
38
|
export function analyzeMarkdown(source) {
|