Pasting multi-line functions repeats their lines pointlessly
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, nodejs
- 領域
- cli
調査の方向性
The bug is in the REPL's multi-line input redraw on Windows, so start in lib/repl.js and the readline-based line refresh logic that re-renders the buffer as the user pastes. Reproduce by pasting the multi-line Fib snippet into node on Windows and confirm the duplicated prompt lines. Done means the pasted function is echoed once per line with no repeated lines, and a test under test/parallel for REPL output passes.
索引モデルが issue の本文から書いたものです。
説明
Version
v26.13.0
Platform
Microsoft Windows NT 10.0.19045.0 x64
Subsystem
No response
What steps will reproduce the bug?
- Open Node.
- Paste:
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
if(!Number.isInteger(I)||I<0)return'Please enter a positive integer or zero!'
if(I===0||I===1)return I
let a=0,b=1,c;--I;do{c=a+b;a=b;b=c}while(--I!==0)// # iterations = I-1
return c
}// e.g. Fib(7) //➜ 13 , Fib(8) //➜ 21 , Fib(9) //➜ 34
You'll see that it looks like this:
node
Welcome to Node.js v26.13.0.
Type ".help" for more information.
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
| if(!Number.isInteger(I)||I<0)return'Please enter a positive integer
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
| if(!Number.isInteger(I)||I<0)return'Please enter a positive integer
Fib=I=>{// Iterative Fibonacci , I = Integer ≥ 0
| if(!Number.isInteger(I)||I<0)return'Please enter a positive integer
or zero!'
| if(I===0||I===1)return I
| let a=0,b=1,c;--I;do{c=a+b;a=b;b=c}while(--I!==0)// # iterations = I-1
| return c
| }// e.g. Fib(7) //➜ 13 , Fib(8) //➜ 21 , Fib(9) //➜ 34
[Function: Fib]
How often does it reproduce? Is there a required condition?
It happens every time.
What is the expected behavior? Why is that the expected behavior?
I expect it to work the way that it did in past versions of Node and also as the DevTools console works. Not repeat the same line like 5 times.
What do you see instead?
Lines being repeated, 3 times, 5 times, etc.
Additional information
No response
- 主要言語
- JavaScript
- スター
- 124k
- フォーク
- 38k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 266
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nodejs/node のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
メンテナーはふだん 1 日以内に返信
-
fs: document readStream.start and readStream.end対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンdoc
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
nodejs/node#67848 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
doc: document the Buffer.prototype.*Slice() methods対応中かも @AyushCipher が今日担当しました。 オープンdoc
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
nodejs/node#67847 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
`styleText` fast path bypasses `options` and `options.validateStream` validation対応中かも @GBra-4-669 が 8 日前に担当しました。 オープンutil
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
riscv64
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nodejs/node#67655 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug triage needed
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
resource-submission validation-passed
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
hesreallyhim/awesome-claude-code#3773 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
tabatkins/railroad-diagrams#129 ·
-
web: api() turns a null or object-valued error body into a TypeError or "[object Object]" and loses the status対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信