-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
FR: CodeBlocks in REPL. #20817
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
Comments
I'm fairly sure this has been discussed before but I can't find the issue. The problem with your suggestion is that you won't be able to edit code blocks anymore since the REPL is line-oriented. It's not a text editor where you can move up and down. (Not counting |
@bnoordhuis can't we trim the newlines from the code block to make sure that the block shows up on a single line? That's what the mongoDB REPL does, and is quite convenient. |
Shells like bash or zsh can do that: https://asciinema.org/a/lBGxcTTxXoGGhPmhARMAt0CsG Is it an option for Node? |
@AyushG3112 I don't think so. ASI means JS code with and without newlines doesn't necessarily behave the same. |
Agree that we won't be able to edit it, but it would make this easier to tracking what was done, maybe we need to copy the block or we are demoing something on REPL... |
This got fixed : #22153 and landed in master. Was surprised, I didn't notice this issue before (I saw the problem myself and fixed it :)). We can close this now. |
@antsmartian Awesome! We can try this on nightly, I guess. |
So, today:
Rather, if we could display the entire code block, when we do an up arrow, like:
This should make life on the REPL much easier.
Very similar to how devtool console treats code blocks.
The text was updated successfully, but these errors were encountered: