vuepress-plugin-fulltext-search
vuepress-plugin-fulltext-search copied to clipboard
Not showing all possible matches
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
We are having the exact same issue, we will try to implement this fix, thanx :)