-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix explain rendering with Windows EOL #14456
Fix explain rendering with Windows EOL #14456
Conversation
@@ -254,7 +254,7 @@ trait MessageRendering { | |||
sb.append(EOL).append(newBox()) | |||
sb.append(EOL).append(offsetBox).append(" Explanation (enabled by `-explain`)") | |||
sb.append(EOL).append(newBox(soft = true)) | |||
dia.msg.explanation.split(EOL).foreach { line => | |||
dia.msg.explanation.split("\n").foreach { line => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scala> "a\rb\r\nc\nd".split(raw"\R")
val res0: Array[String] = Array(a, b, c, d)
is convenient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I didn't know about it. Thanks!
@nicolasstucki I found the problem! 🥳 In your last change, you split a string using Long-term, we might want to use |
e40de5c
to
c7fbab6
Compare
Just when you thought it was safe to strip left borders: #17783 I used to see line ending problems often on cygwin using scala 2. I began to prefer
where you really want a macro interpolator to automate it. |
@mbovel could you open an issue to track and explain the details that need to be changed? |
[test_windows_full]