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

Match result seems to be incorrect if the search input have spaces #781

Open
1 of 2 tasks
ldalzottomp opened this issue Oct 14, 2024 · 1 comment
Open
1 of 2 tasks
Labels

Comments

@ldalzottomp
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

FuseJS 7.0.0

Tested on FuseJS 6.6.2 as well. Same issue.

When the search input have spaces, the match result seems to be incorrect. More details in the following example.

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

Connect to the live demo : https://www.fusejs.io/demo.html
Search for "Lock A"
Set includeMatches to true in the options.

Expected behavior

The first result is "The Lock Artist". And the match indices doesn't include the space before "Lock".
Current result returns match indices of 3,9 . Which is " Lock A". (note, last index is included).

Or am I missing something?

Screenshots

Screenshot 2024-10-14 at 10 23 49

Additional context

No response

@ldalzottomp
Copy link
Author

After thinking about this, I am not sure that this is an issue really.

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