@vuepress-plume/plugin-search 1.0.0-rc.160 → 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 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
- const item = {
235
- id,
236
- text,
237
- title: titles.at(-1),
238
- titles: titles.slice(0, -1)
239
- };
240
- index.add(item);
241
- cache.push(item);
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;
@@ -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.160",
4
+ "version": "1.0.0-rc.162",
5
5
  "description": "The Plugin for VuePress 2 - local search",
6
6
  "author": "pengzhanbo <volodymyr@foxmail.com>",
7
7
  "license": "MIT",
@@ -35,14 +35,14 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@vuepress/helper": "2.0.0-rc.112",
38
- "@vueuse/core": "^13.6.0",
39
- "@vueuse/integrations": "^13.6.0",
38
+ "@vueuse/core": "^13.9.0",
39
+ "@vueuse/integrations": "^13.9.0",
40
40
  "chokidar": "4.0.3",
41
41
  "focus-trap": "^7.6.5",
42
42
  "mark.js": "^8.11.1",
43
43
  "minisearch": "^7.1.2",
44
44
  "p-map": "^7.0.3",
45
- "vue": "^3.5.18"
45
+ "vue": "^3.5.21"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"