vuepress-plugin-fulltext-search icon indicating copy to clipboard operation
vuepress-plugin-fulltext-search copied to clipboard

Not showing all possible matches

Open gabysantosw opened this issue 2 years ago • 1 comments

When we have words within the content (specially if they are the first word of a paragraphs), we might not get a match. The reason seems to be parsing of \n, a fix that helped was doing this:

index.add(
      pages.map((p) => ({
        ...p,
        content: p.content.replaceAll(/\n{2,}\s*/g, "\n "),
      }))
    );

within the flexsearch service

gabysantosw avatar Aug 26 '22 10:08 gabysantosw

We are having the exact same issue, we will try to implement this fix, thanx :)

nbaud avatar Nov 22 '23 21:11 nbaud