Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix unreleased global filter code on unusual characters (#976)
* test: Extra global filter tests - 2 fail, git hooks disabled TODO Make the test more succinct * test: Interim commit - 1 fail, git hooks disabled Work towards making the new tests more succinct * test: Interim commit - multiple fails, git hooks disabled Work towards making the new tests more succinct * fix: Escape * character in global filter * fix: Escape . character in global filter * test: Remove unwanted console output in test * fix: Escape + character in global filter * fix: Escape ? character in global filter * fix: Escape ^ character in global filter * fix: Escape $ character in global filter * comment: Note some special characters that do not fail when used on their own as global filter. So a better test will be needed to show why they need to be escaped. * fix: Escape { character in global filter * fix: Escape } character in global filter * fix: Escape ( character in global filter * fix: Escape ) character in global filter * comment: Add comment-out copy of original regexp * fix: Escape | character in global filter * fix: Escape [ character in global filter * fix: Escape ] character in global filter This fixes the missing escape in the original implementation * fix: Escape \ character in global filter * fix: Escape / character in global filter NB No failing test for this. I was not able to find a global filter pattern with '/' in that made the tests fail * test: Tests indicated I should not escape = character * test: Tests indicated I should not escape ! character * test: Tests indicated I should not escape : character * comment: Remove comments showing original escapeRegExp() This is a manual revert of 2fe7b65 * comment: Reinstate * which I lost in merge * comment: Add explanation of non-escaped characters I copied the text from @AnnaKornfeldSimpson's explanation in: esm7#18 (comment) Co-Authored-By: Anna Kornfeld Simpson <AnnaKornfeldSimpson@users.noreply.github.com> * comment: Add to explain the character selection in test Co-authored-by: Erez Shermer <erezshermer@gmail.com> Co-authored-by: Anna Kornfeld Simpson <AnnaKornfeldSimpson@users.noreply.github.com>
- Loading branch information