Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong results of highlighting #792

Open
1 of 2 tasks
pbelzek-cq opened this issue Jan 13, 2025 · 0 comments
Open
1 of 2 tasks

Wrong results of highlighting #792

pbelzek-cq opened this issue Jan 13, 2025 · 0 comments
Labels

Comments

@pbelzek-cq
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

I've observed that Fuse.js highlights substrings of searched keywords. It doesn't make any sense to do so because it leads to false positives and highlights that provide no value for the user.

You can find a sandbox here: https://codesandbox.io/p/sandbox/wc7pl4

(I'm on 7.0.0 version - there is no 7.0.0 option in the select menu in issue creator, you should add it)

The Fuse.js version where this bug is happening.

Other (please specify in description)

Is this a regression?

  • This is a regression bug

Which version did this behavior use to work in?

None

Steps To Reproduce

  1. In the input field type in olympics
    In matches array, most of the selected indices refer to substrings of the search keyword.For example, it highlights sets of two letters like ic in the word office because ic also exists in the word olympics.

Expected behavior

It should highlight provided keywords as a whole, not a substrings of them. When searching for olympics it should only highlight the word olympics, not ic in the word office.

Screenshots

No response

Additional context

No response

@pbelzek-cq pbelzek-cq added the bug label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant