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

Ignore a "/" symbol at the end of the query

Open serhiipylypchuk1991 opened this issue 2 years ago • 8 comments

How to ignore a "/" symbol at the end of the query?

I want to enter the "mode/" string and search for the "mode" value (and highlight it on the page) Is it possible at all?

serhiipylypchuk1991 avatar Jul 20 '22 09:07 serhiipylypchuk1991

The "/" should have already been ignored right now. Try searching style/ on our demo website.

weareoutman avatar Jul 20 '22 09:07 weareoutman

What about such url https://easyops-cn.github.io/docusaurus-search-local/docs/?_highlight=style/

serhiipylypchuk1991 avatar Jul 20 '22 09:07 serhiipylypchuk1991

I want to highlight the "style" word using the URL with "/" at the end

serhiipylypchuk1991 avatar Jul 20 '22 09:07 serhiipylypchuk1991

This url is probably edited by hand, in practice, end users will not come into such url. I don't understand your scenario about how to get such url.

weareoutman avatar Jul 20 '22 09:07 weareoutman

Ok, It is my real case https://docs.dhtmlx.com/todolist/api/methods/addproject_method/?_highlight=addproj

serhiipylypchuk1991 avatar Jul 20 '22 09:07 serhiipylypchuk1991

the "/" is added automatically

serhiipylypchuk1991 avatar Jul 20 '22 09:07 serhiipylypchuk1991

Um, I think it is added by your website host. First try configuring your host to tell it to not add the "/".

If that's not possible, and if it's a common issue for well used website hosts, then we'll consider to add an option to ignore it.

weareoutman avatar Jul 20 '22 09:07 weareoutman

It would be very suitable to set an array with symbols to be ignored)

For instance: ignoreSymbols: ["/", "$", "%"]

serhiipylypchuk1991 avatar Jul 20 '22 09:07 serhiipylypchuk1991