You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using fuzzy:true for filtering with just a string query, the filter extension code doesn't _escapeRegex the characters used to build up the fuzzy regex.
Filtering for something like .* will throw a JS exception. The constructed fuzzy regex looks like this .[^*]** which is invalid.
Would expect it to produce \.[^\*]*\* which matches properly.
Seeing this in Chrome 56
jquery 1.10.1
fancytree 2.21
I have a fix in mind for this already and will try to get a PR up for it in the next few days.
The text was updated successfully, but these errors were encountered:
Escaping the `filter` directly will not work because,
it gets further split into individual characters.
So, escape each character after splitting
closesmar10#700
* Changes to pkg and pkg lock files after `npm i`
* fix (ext-filter): escape regex for fuzzy filter
Escaping the `filter` directly will not work because,
it gets further split into individual characters.
So, escape each character after splitting
closes#700
* fix (ext-filter): Highlight not working for fuzzy matched chars
Use regex capture group to compute the indices of the
matching character and then highlight them.
closes#1051
* playground for ext-filter
* add unit tests for the fuzzy match highlight fix
* simpler condition and comments
* filter test the equality of filter and highlighted chars
* cache exotic char regex in filter cb's closure
* cache exotic char only if `escapeTitles` is truthy
* Update CHANGELOG.md
Co-authored-by: Martin Wendt <github@wwwendt.de>
When using fuzzy:true for filtering with just a string query, the filter extension code doesn't _escapeRegex the characters used to build up the fuzzy regex.
Filtering for something like
.*
will throw a JS exception. The constructed fuzzy regex looks like this.[^*]**
which is invalid.Would expect it to produce
\.[^\*]*\*
which matches properly.Seeing this in Chrome 56
jquery 1.10.1
fancytree 2.21
I have a fix in mind for this already and will try to get a PR up for it in the next few days.
The text was updated successfully, but these errors were encountered: