Special characters are not escaped properly in replace
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
What happened: Characters not getting escaped correctly in replace
What did you expect to happen: Special characters being properly escaped
How to reproduce it (as minimally and precisely as possible):
- make a text file containing
foo - vim command:
%s/foo/"\\n"/g - This results in
"\\n"getting placed into the file, not"\n". Curiously:%s/foo/"\n"/gworks as intended (newlines are inserted into the file).
Environment:
- Extension (VsCodeVim) version: 0.12.0
- VSCode version: 1.23.1 (x64)
- OS version: Windows 10 1803
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the %s/foo/"\\n"/g and %s/foo/"\n"/g commands in VSCodeVim with the reported VS Code and extension versions, then trace the substitution and escaping entry point. Done means replacement text preserves the intended escaped characters while still inserting newlines as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100