-
Notifications
You must be signed in to change notification settings - Fork 28.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
search: fix faulty replacements in crlf files with lf regex
Fixes #165700 Regex normalization was actually working fine (finally). The issue was JS code was matching again to do the replacement. If the original regex only was written for LF, but the file was CRLF, VS Code did not attempt to normalize line feeds until it tried to pull the surrounding content as well as a 'last resort'. If the surrounding content included a match before the intended one, then that would be used instead, resulting in the bug. PR does a small style change to add early returns to avoid nesting.
- Loading branch information
1 parent
782e13b
commit a40099f
Showing
1 changed file
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters