docusaurus-plugin-search-local icon indicating copy to clipboard operation
docusaurus-plugin-search-local copied to clipboard

Fixing links to search results if hash is present

Open dima opened this issue 8 months ago • 1 comments

For some reason my search index after docusaurus build contains u and h that are the same except h also has a hash, so the following code will always produce wrong links for any search result that's a deep link. The fix resolves the problem.

{"i":4,"t":"Introduction","u":"/blog/2024/05/01/xyz","h":"/blog/2024/05/01/xyz#introduction","p":2}

The original code makes sense if the search-index.json h entry would only contain the hash and nothing else but that's not what I get. Please review and let me know if there's some other configuration setting that fixes this.

dima avatar Jun 12 '24 16:06 dima