readline.line automatically escapes input
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
Version
18.12.0
Platform
Microsoft Windows NT 10.0.22621.0 x64
Subsystem
readline
What steps will reproduce the bug?
Use readline and access its line variable.
rl.line
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
I see that if I input \n, then it is automatically escaped with \\n, is it possible to disable this behavior and get \n?
Additional information
I am not sure if this behavior is something wanted. If so, then I am asking if there is an alternative to get the non-escaped character. (\n)
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 report with Node.js 18.12.0 on Windows by using readline and inspecting rl.line after entering the reported input. Clarify whether the input represents a literal backslash sequence or a newline, then determine the intended behavior; completion requires a confirmed expectation and a regression test or documented alternative in the readline subsystem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100