readline.line automatically escapes input
未关闭
还没有人认领这个 Issue。
readline
- 主要语言
- JavaScript
- 星标
- 122k
- 派生
- 37.3k
- 平均合并
- 4 天 2 小时
- 30 天内合并 PR
- 283
描述
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)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 Windows 上使用 Node.js 18.12.0,通过使用 readline 并在输入报告中的输入后检查 rl.line,重现该报告。明确该输入表示的是字面反斜杠序列还是换行符,然后确定预期行为;只有确认了预期,并在 readline 子系统中提供回归测试或记录替代方案,才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, node.js
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 45/100