-
Notifications
You must be signed in to change notification settings - Fork 1.1k
REPL renders syntax highlighting colors INSIDE of strings when echoing evaluated values, happens after colon :
and leading val
#11555
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
Perhaps related to #10615 |
:
and for leading val
:
and for leading val
:
and for leading val
:
and for leading val
:
and for leading val
:
and leading val
The echoed text is no longer in double quotes. (This is finally addressed in the scala 2 PR for repl printing.) |
@som-snytt You mean this one? scala/scala#8885 (still open at time of writing) The current Scala 2 REPL does correctly not try to syntax highlight inside arbitrary strings, so this is a regression in Scala 3. |
Yes, example diff from the PR
In Scala 3, compare
The PR adds the double quotes via The highlighter highlights what you render. Note that Scala 2 colorization doesn't really compare. Scala 3 invokes |
I goosed the Scala 2 PR again. I have no idea why they thought it was essential to put "val" in front of REPL output, but it doesn't matter whether strings are rendered with quotes. With quotes, Scala 3 colors are correct.
|
I think the |
This is the Scala 2 REPL PR:
The escaping triple quotes for multiline, but uses ordinary escape for internal quote. Edit: actually, the second example is wrong, it shouldn't do both! thanks for the heads up, @bjornregnell |
:
and leading val
:
and leading val
Compiler version
3.0.0-RC1 and also in 3.0.0-RC2-bin-20210226-63a467b-NIGHTLY
Minimized code
If you enter this in REPL strange colors will emerge in echo: (see output png below)
Output
Expectation
Syntax highlighting should not be activated when rendering of characters inside string values when echoed.
The text was updated successfully, but these errors were encountered: