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

Returned indexes are incorrect #761

Closed
1 of 2 tasks
dafi opened this issue Feb 24, 2024 · 1 comment
Closed
1 of 2 tasks

Returned indexes are incorrect #761

dafi opened this issue Feb 24, 2024 · 1 comment

Comments

@dafi
Copy link

dafi commented Feb 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

I search using includeMatches option and when the pattern contains round brackets ( or ) the returned indexes are incorrect

The Fuse.js version where this bug is happening.

7.0.0

Is this a regression?

  • This is a regression bug

Which version did this behavior use to work in?

7.0.0

Steps To Reproduce

I created a complete example to reproduce the issue at https://stackblitz.com/edit/vitejs-vite-ml32lm?file=main.js

As you can see in the first case the returned indexes are identical

Index 0 start 0 end 25

Index 1 start 0 end 25

In second case the index at 1 differs from start only by 1, this create incorrect results when I highlight in HTML

Index 0 start 0 end 23

Index 1 start 1 end 23

Expected behavior

I expect no duplicated indexes and start at index >= 1 always greater than previous end valuey

Screenshots

No response

Additional context

No response

@dafi dafi added the bug label Feb 24, 2024
Copy link

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days

@github-actions github-actions bot added the Stale label Jun 24, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant