Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: avoid creating invalid regex in no-warning-comments (fixes #11471)…
… (#11472) 5018378 changed the codebase to use unicode regexes almost everywhere, with the exception of places where regexes are constructed from user input. However, two issues occurred to cause a bug: * Due to an oversight, the regular expressions constructed in the `no-warning-comments` rule were changed to be unicode regexes even though those regexes were constructed from user input. * The `no-warning-comments` rule dynamically creates regexes with unnecessary escape characters, and unnecessary escape characters are invalid in unicode regexes. This commit fixes the first issue. The second issue isn't a problem on its own, but it will need to be fixed in order to implement #11423.
- Loading branch information