@@ -144,7 +144,8 @@ println("&&&&&&&&&&&")
144
144
145
145
private [scalatest] def getSnippets (text : String ): Vector [Snippet ] = {
146
146
// println("text: " + text)
147
- val lines = Vector .empty ++ text.lines.toIterable
147
+ // work around scala/bug#11152 on JDK 11
148
+ val lines = Vector .empty ++ Predef .augmentString(text).lines.toIterable
148
149
// println("lines: " + lines)
149
150
val pairs = lines map { line =>
150
151
val trimmed = line.trim
@@ -186,7 +187,8 @@ println("&&&&&&&&&&&")
186
187
private [scalatest] object Doc {
187
188
188
189
private [scalatest] def trimMarkup (text : String ): String = {
189
- val lines = text.lines.toList
190
+ // work around scala/bug#11152 on JDK 11
191
+ val lines = Predef .augmentString(text).lines.toList
190
192
val zipLines = lines.zipWithIndex
191
193
val firstNonWhiteLine = zipLines.find { case (line, _) => ! line.trim.isEmpty }
192
194
val lastNonWhiteLine = zipLines.reverse.find { case (line, _) => ! line.trim.isEmpty }
@@ -197,7 +199,8 @@ private[scalatest] object Doc {
197
199
}
198
200
199
201
private [scalatest] def stripMargin (text : String ): String = {
200
- val lines = text.lines.toList
202
+ // work around scala/bug#11152 on JDK 11
203
+ val lines = Predef .augmentString(text).lines.toList
201
204
val firstNonWhiteLine = lines.find(! _.trim.isEmpty)
202
205
firstNonWhiteLine match {
203
206
case None => text.trim
0 commit comments