Skip to content

repl: handling multiline history needs some case guards #24231

Closed
@vsemozhetbyt

Description

  • Version: master
  • Platform: Windows 7 x64
  • Subsystem: repl
  1. 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.

  1. Another case that needs special handling, multiline template literals:
> `a
... b
... c`
'a\nb\nc'
> bc`
...

cc @antsmartian

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions