eoger / tabcenter-redux

Vertical Tabs extension for Firefox
Mozilla Public License 2.0
381 stars 67 forks source link

Tokenize search results and highlight the matches in the sidebar #306

Open thomcc opened 6 years ago

thomcc commented 6 years ago

By tokenize I just mean allow searching "foo bar" to match "foo baz bar" and such, each word (split on \s+) is checked separately.

The more complex part of this is highlighting them, or really figuring out which parts to highlight. The end result behaves pretty well.

eoger commented 6 years ago

From IRC: Can you also put findHighlightedRanges and _highlightSearchResults in a separate file? You could provide a callback to create the nodes.

eoger commented 6 years ago

Also interesting possibility is we want fuzzy search: https://github.com/farzher/fuzzysort

thomcc commented 6 years ago

Fuzzy search would be better without a doubt. It seemed to me like this was a necessary first step though, but I hadn't considered just using a library for it.

ariasuni commented 5 years ago

Should this be closed, since fuzzy searching has been implemented?