@vuepress-plume/plugin-search 1.0.0-rc.159 → 1.0.0-rc.161
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 +12 -8
- package/lib/shared/index.js +1 -0
- package/package.json +3 -3
package/lib/node/index.js
CHANGED
|
@@ -231,14 +231,18 @@ ${page.contentRendered}`;
|
|
|
231
231
|
if (!section || !(section.text || section.titles)) break;
|
|
232
232
|
const { anchor, text, titles } = section;
|
|
233
233
|
const id = anchor ? [fileId, anchor].join("#") : fileId;
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
234
|
+
if (index.has(id)) if (anchor) logger.error(`${colors.green("[@vuepress-plume/plugin-search]")} duplicate heading anchor : ${colors.cyan(titles.join(" >> "))} \n at ${colors.cyan(fileId)}`);
|
|
235
|
+
else logger.error(`${colors.green("[@vuepress-plume/plugin-search]")} duplicate page permalink : ${colors.cyan(fileId)}`);
|
|
236
|
+
else {
|
|
237
|
+
const item = {
|
|
238
|
+
id,
|
|
239
|
+
text,
|
|
240
|
+
title: titles.at(-1),
|
|
241
|
+
titles: titles.slice(0, -1)
|
|
242
|
+
};
|
|
243
|
+
index.add(item);
|
|
244
|
+
cache.push(item);
|
|
245
|
+
}
|
|
242
246
|
}
|
|
243
247
|
}
|
|
244
248
|
const headingRegex = /<h(\d*).*?>(<a.*? href="#.*?".*?>[\s\S]*?<\/a>)<\/h\1>/gi;
|
package/lib/shared/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress-plume/plugin-search",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.161",
|
|
5
5
|
"description": "The Plugin for VuePress 2 - local search",
|
|
6
6
|
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@vuepress/helper": "2.0.0-rc.112",
|
|
38
|
-
"@vueuse/core": "^13.
|
|
39
|
-
"@vueuse/integrations": "^13.
|
|
38
|
+
"@vueuse/core": "^13.7.0",
|
|
39
|
+
"@vueuse/integrations": "^13.7.0",
|
|
40
40
|
"chokidar": "4.0.3",
|
|
41
41
|
"focus-trap": "^7.6.5",
|
|
42
42
|
"mark.js": "^8.11.1",
|