atom / fuzzaldrin

Fuzzy filtering and string scoring
MIT License
319 stars 28 forks source link

match scorer methods closely #10

Closed philschatz closed 10 years ago

philschatz commented 10 years ago

The .match() method now returns an array of string indexes for each matched char. This allows the code to follow scorer almost exactly and simplifies the logic in fuzzy-finder.

It does have one issue. Since scorer will double-count characters, a search for rc against src/scorer.coffee will result in s[r][c]/sco[r]er.[c]offee. See screenshot:

fuzzy-overlap

This "feature" can be removed by simplifying the unless queryHasSlashes code in fuzzaldrin.coffee to either:

The corresponding https://github.com/atom/fuzzy-finder/pull/39 has been updated to use this code.

kevinsawicki commented 10 years ago

Thanks for this

kevinsawicki commented 10 years ago

I published 2.0.0 of this library with this in it.