fuzzysort icon indicating copy to clipboard operation
fuzzysort copied to clipboard

Not detecting multiple instances of the search target in the same line

Open MTG2000 opened this issue 8 months ago • 1 comments

Hi 👋

I'm not sure if this is the intended behaviour, but I noticed that when there are multiple occurrences of the search term in a line, only one of them is detected and added to the indexes array.

You can see this behaviour on the demo page: https://rawgit.com/farzher/fuzzysort/master/test/test.html

Notice how Youtube is only highlighted once in the first search result even though it appears 2 times. Image

Is this intentional? Cause I think right now, it might be confusing/misleading to the user when he types a search term & it's not being highlighted in some places making him maybe miss it.

MTG2000 avatar Jun 10 '25 08:06 MTG2000