-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.load
accumulates indentation
#47673
Labels
Comments
I'll take a stab at this one. Open to hearing any ideas anyone may have before I dig in. |
hi @GethosTheWalrus If ur not working on it right now can i look into this issue |
STRd6
added a commit
to STRd6/node
that referenced
this issue
Sep 2, 2023
When using .load the REPL would accumulate indentation with each line including the indentation from all previous lines. Now it keeps the indentation at the correct level. Fixes: nodejs#47673
STRd6
added a commit
to STRd6/node
that referenced
this issue
Sep 7, 2023
When using .load the REPL would accumulate indentation with each line including the indentation from all previous lines. Now it keeps the indentation at the correct level. Fixes: nodejs#47673
nodejs-github-bot
pushed a commit
that referenced
this issue
Sep 21, 2023
When using .load the REPL would accumulate indentation with each line including the indentation from all previous lines. Now it keeps the indentation at the correct level. Fixes: #47673 PR-URL: #49461 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
ruyadorno
pushed a commit
that referenced
this issue
Sep 28, 2023
When using .load the REPL would accumulate indentation with each line including the indentation from all previous lines. Now it keeps the indentation at the correct level. Fixes: #47673 PR-URL: #49461 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
alexfernandez
pushed a commit
to alexfernandez/node
that referenced
this issue
Nov 1, 2023
When using .load the REPL would accumulate indentation with each line including the indentation from all previous lines. Now it keeps the indentation at the correct level. Fixes: nodejs#47673 PR-URL: nodejs#49461 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Kohei Ueno <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Version
v19.9.0
Platform
Microsoft Windows NT 10.0.22621.0 x64
Subsystem
repl
What steps will reproduce the bug?
example.js
with the following contents:node
, and enter the following command:How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
I expect the REPL to repeat code exactly as it appears in
example.js
:And then for the code to output:
(For example, this is the output from
node example.js
.)What do you see instead?
The REPL repeats the code with accumulated indentation, where each line includes all of the indentation from all previous lines:
This results in incorrect behavior with the template string. The code outputs:
Additional information
This issue arose when using the
repl
package to make a REPL for an indentation-based language, Civet..load
is then nonfunctional; see DanielXMoore/Civet#509But it also affects correctness of JavaScript as illustrated above.
The text was updated successfully, but these errors were encountered: