Is there an existing issue for this?
Description of the bug
It seems I have run into an edge case with the exact matching. The SPACE_RE regex does not handle an edge case that from time to time occurs in my usage.
I managed to narrow it down to a string where a text is followed by a whitespace, followed by a double quote and then text. This gets erroneously split into two query parts on the whitespace, even though it was meant to be a single exact match query. I've set up a few tests at https://regex101.com/r/jlilH6/5 to try and wrap my head around it.
The Fuse.js version where this bug is happening.
6.6.2
Is this a regression?
Which version did this behavior use to work in?
None
Steps To Reproduce
- Run a search with the string
="said "test"
- Set a breakpoint in the
parseQuery(pattern) method
- Observe
item: "=\"said \"test\"" and query: ['="said', '"test"']
Expected behavior
I expected it to keep the exact match intact, and therefor to see at step 3 query: ['="said "test"']
Screenshots
No response
Additional context
No response
Is there an existing issue for this?
Description of the bug
It seems I have run into an edge case with the exact matching. The
SPACE_REregex does not handle an edge case that from time to time occurs in my usage.I managed to narrow it down to a string where a text is followed by a whitespace, followed by a double quote and then text. This gets erroneously split into two query parts on the whitespace, even though it was meant to be a single exact match query. I've set up a few tests at https://regex101.com/r/jlilH6/5 to try and wrap my head around it.
The Fuse.js version where this bug is happening.
6.6.2
Is this a regression?
Which version did this behavior use to work in?
None
Steps To Reproduce
="said "test"parseQuery(pattern)methoditem: "=\"said \"test\""andquery: ['="said', '"test"']Expected behavior
I expected it to keep the exact match intact, and therefor to see at step 3
query: ['="said "test"']Screenshots
No response
Additional context
No response