repl: handling multiline history needs some case guards #24231
Closed
Description
- Version: master
- Platform: Windows 7 x64
- Subsystem: repl
- Recently added REPL multiline history handling streamlines multiline expressions into one-line expressions, but line comments may change syntax and hang execution:
> [
... 1 // comment
... ]
[ 1 ]
> [ 1 // comment]
...
This is relevant if someone pastes copied code blocks with line comments in the REPL. It seems comments need to be stripped.
- Another case that needs special handling, multiline template literals:
> `a
... b
... c`
'a\nb\nc'
> bc`
...
cc @antsmartian
Activity