Skip to content

Commit 8443909

Browse files
committed
Replace all of \r\n, \n, and \r in diagnostics.
1 parent 2961971 commit 8443909

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

frontend/src/test/scala/bloop/bsp/BspClientTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ trait BspClientTest {
339339
val canonical = pathString.replace(File.separatorChar, '/')
340340
val report = diagnostics.map(
341341
_.copy(source = Some("_"), code = Some("_")).toString
342-
.replace("\n", " ")
343-
.replace(END_OF_LINE_MATCHER, " ")
342+
.replaceAll(END_OF_LINE_MATCHER, " ")
344343
)
345344
builder
346345
.++=(s"#${compileIteration()}: $canonical\n")

shared/src/main/scala/bloop/io/Environment.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ object Environment {
5151
* - "\r\n"
5252
* - "\r"
5353
*/
54-
def END_OF_LINE_MATCHER = "\r\n|\n"
54+
def END_OF_LINE_MATCHER = "\r\n|\n|\r"
5555

5656
/*
5757
* A list of valid shell paths. The SHELL environment variable must

0 commit comments

Comments
 (0)