@mdit-vue/shared 0.10.0 → 0.11.2
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/dist/index.cjs +1 -3
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
const htmlEscapeMap = {
|
|
6
4
|
"&": "&",
|
|
7
5
|
"<": "<",
|
|
@@ -75,7 +73,7 @@ const resolveHeadersFromTokens = (tokens, {
|
|
|
75
73
|
};
|
|
76
74
|
for (let i = 0; i < tokens.length; i += 1) {
|
|
77
75
|
const token = tokens[i];
|
|
78
|
-
if (token?.type !== "heading_open") {
|
|
76
|
+
if (token?.type !== "heading_open" || token?.level !== 0) {
|
|
79
77
|
continue;
|
|
80
78
|
}
|
|
81
79
|
const headerLevel = Number.parseInt(token.tag.slice(1), 10);
|
package/dist/index.mjs
CHANGED
|
@@ -71,7 +71,7 @@ const resolveHeadersFromTokens = (tokens, {
|
|
|
71
71
|
};
|
|
72
72
|
for (let i = 0; i < tokens.length; i += 1) {
|
|
73
73
|
const token = tokens[i];
|
|
74
|
-
if (token?.type !== "heading_open") {
|
|
74
|
+
if (token?.type !== "heading_open" || token?.level !== 0) {
|
|
75
75
|
continue;
|
|
76
76
|
}
|
|
77
77
|
const headerLevel = Number.parseInt(token.tag.slice(1), 10);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdit-vue/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Shared utils and types of mdit-vue",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown-it",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"test": "vitest"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@mdit-vue/types": "0.
|
|
39
|
+
"@mdit-vue/types": "0.11.0",
|
|
40
40
|
"@types/markdown-it": "^12.2.3",
|
|
41
41
|
"markdown-it": "^13.0.1"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "676ec4ca8704d709e7a47f7f6d41ff3f70dc2356"
|
|
47
47
|
}
|