vuepress-plugin-md-power 1.0.0-rc.161 → 1.0.0-rc.162
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/lib/node/index.js +16 -10
- package/package.json +11 -11
package/lib/node/index.js
CHANGED
|
@@ -870,15 +870,21 @@ function getFileIconTypeFromExtension(fileName) {
|
|
|
870
870
|
|
|
871
871
|
//#endregion
|
|
872
872
|
//#region src/node/utils/cleanMarkdownEnv.ts
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
873
|
+
const WHITE_LIST = [
|
|
874
|
+
"base",
|
|
875
|
+
"filePath",
|
|
876
|
+
"filePathRelative",
|
|
877
|
+
"references",
|
|
878
|
+
"abbreviations",
|
|
879
|
+
"annotations"
|
|
880
|
+
];
|
|
881
|
+
function cleanMarkdownEnv(env, excludes = []) {
|
|
882
|
+
const result = {};
|
|
883
|
+
for (const key of WHITE_LIST) {
|
|
884
|
+
if (excludes.includes(key)) continue;
|
|
885
|
+
result[key] = env[key];
|
|
886
|
+
}
|
|
887
|
+
return result;
|
|
882
888
|
}
|
|
883
889
|
|
|
884
890
|
//#endregion
|
|
@@ -4191,7 +4197,7 @@ const annotationPlugin = (md) => {
|
|
|
4191
4197
|
const label = tokens[idx].meta.label;
|
|
4192
4198
|
const data = env.annotations[`:${label}`];
|
|
4193
4199
|
return `<Annotation label="${label}" :total="${data.sources.length}">${data.sources.map((source, i) => {
|
|
4194
|
-
const annotation = data.rendered[i] ??= md.render(source, env);
|
|
4200
|
+
const annotation = data.rendered[i] ??= md.render(source, cleanMarkdownEnv(env, ["references"]));
|
|
4195
4201
|
return `<template #item-${i}>${annotation}</template>`;
|
|
4196
4202
|
}).join("")}</Annotation>`;
|
|
4197
4203
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuepress-plugin-md-power",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.162",
|
|
5
5
|
"description": "The Plugin for VuePress 2 - markdown power",
|
|
6
6
|
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"artplayer": "^5.2.5",
|
|
35
35
|
"dashjs": "^5.0.3",
|
|
36
36
|
"esbuild": "^0.25.9",
|
|
37
|
-
"hls.js": "^1.6.
|
|
37
|
+
"hls.js": "^1.6.11",
|
|
38
38
|
"less": "^4.4.1",
|
|
39
39
|
"markdown-it": "^14.1.0",
|
|
40
40
|
"mpegts.js": "^1.7.3",
|
|
41
41
|
"pyodide": "^0.28.2",
|
|
42
|
-
"sass": "^1.
|
|
43
|
-
"sass-embedded": "^1.
|
|
42
|
+
"sass": "^1.92.0",
|
|
43
|
+
"sass-embedded": "^1.92.0",
|
|
44
44
|
"stylus": "^0.64.0",
|
|
45
45
|
"vuepress": "2.0.0-rc.24"
|
|
46
46
|
},
|
|
@@ -86,24 +86,24 @@
|
|
|
86
86
|
"@mdit/plugin-tasklist": "^0.22.1",
|
|
87
87
|
"@pengzhanbo/utils": "^2.1.0",
|
|
88
88
|
"@vuepress/helper": "2.0.0-rc.112",
|
|
89
|
-
"@vueuse/core": "^13.
|
|
89
|
+
"@vueuse/core": "^13.9.0",
|
|
90
90
|
"chokidar": "4.0.3",
|
|
91
91
|
"image-size": "^2.0.2",
|
|
92
|
-
"local-pkg": "^1.1.
|
|
92
|
+
"local-pkg": "^1.1.2",
|
|
93
93
|
"lru-cache": "^11.1.0",
|
|
94
94
|
"markdown-it-container": "^4.0.0",
|
|
95
95
|
"nanoid": "^5.1.5",
|
|
96
|
-
"shiki": "^3.
|
|
96
|
+
"shiki": "^3.12.2",
|
|
97
97
|
"tinyglobby": "0.2.13",
|
|
98
|
-
"tm-grammars": "^1.24.
|
|
99
|
-
"tm-themes": "^1.10.
|
|
100
|
-
"vue": "^3.5.
|
|
98
|
+
"tm-grammars": "^1.24.8",
|
|
99
|
+
"tm-themes": "^1.10.9",
|
|
100
|
+
"vue": "^3.5.21"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@types/markdown-it": "^14.1.2",
|
|
104
104
|
"artplayer": "^5.2.5",
|
|
105
105
|
"dashjs": "^5.0.3",
|
|
106
|
-
"hls.js": "^1.6.
|
|
106
|
+
"hls.js": "^1.6.11",
|
|
107
107
|
"mpegts.js": "1.7.3"
|
|
108
108
|
},
|
|
109
109
|
"publishConfig": {
|