diff --git a/src/node/plugins/localSearchPlugin.ts b/src/node/plugins/localSearchPlugin.ts index d025641c..5828339d 100644 --- a/src/node/plugins/localSearchPlugin.ts +++ b/src/node/plugins/localSearchPlugin.ts @@ -134,6 +134,9 @@ export async function localSearchPlugin( if (!section || !(section.text || section.titles)) break const { anchor, text, titles } = section const id = anchor ? [fileId, anchor].join('#') : fileId + if (index.has(id)) { + index.discard(id) + } index.add({ id, text,