Skip to content

Commit 59c49fa

Browse files
authored
Fix #5463: Replace the call to the String#lines method
1 parent 36281b3 commit 59c49fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/util/ParsedComment.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import dotty.tools.dotc.printing.SyntaxHighlighting
88

99
import scala.Console.{BOLD, RESET, UNDERLINED}
1010
import scala.collection.immutable.ListMap
11+
import scala.collection.immutable.StringOps
1112
import scala.util.matching.Regex
1213

1314
/**
@@ -148,7 +149,7 @@ object ParsedComment {
148149
* @return The list of items, in markdown.
149150
*/
150151
private def toMarkdownList(ctx: Context, items: List[String]): String = {
151-
val formattedItems = items.map(_.lines.mkString(System.lineSeparator + " "))
152+
val formattedItems = items.map(s => new StringOps(s).lines.mkString(System.lineSeparator + " "))
152153
formattedItems.mkString(" - ", System.lineSeparator + " - ", "")
153154
}
154155

0 commit comments

Comments
 (0)