Open daniele-aveta opened 7 months ago
I just tried to reproduce your issue but couldn't. I added the same object to my settings.json and the newline was successfully replaced. Both when using Replace In File and Replace In Selection.
Could you give any more details that could help?
Hmm, I am using mac OS, maybe that has something to do with it
Would it be possible for you to test it in a container or a VM?
Indeed, the line breaks are not being replaced, it's happening to me too. An old regex i had saved is not working anymore. The one detailed here #12.
When doing some tests, replacing \n with spaces, as the Issues states, the line breaks are preserved, and the spaces are added.
VS Code (1.90.2) on Windows 11 and on Ubuntu WSL have the same behavior.
EDIT: Using the option "Find in File", where the regex is applied on VS Code's Find and Replace box works properly.
I'm using regExp Saver v1.1.0 on VS Code 1.88.1 on Windows 10 and whenever I try to replace a new line with something, the extension just adds the replacement string without getting rid of the new line.
Here is my settings.json
I've tried executing the regex with VS Code's replacement tool, and it provides the expected behavior.
Replacing \n with a space
Expected output
Actual output