Skip to content

Commit bb9b127

Browse files
committed
Replace deprecated prefixLength
1 parent 4ad8e54 commit bb9b127

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tastydoc/src/dotty/tastydoc/comment/WikiParser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ private[comment] final class WikiParser(
364364

365365
// maxSkip - size of the longest common whitespace prefix of non-empty lines
366366
val nonEmptyLines = lines.filter(_.trim.nonEmpty)
367-
val maxSkip = if (nonEmptyLines.isEmpty) 0 else nonEmptyLines.map(line => line.prefixLength(_ == ' ')).min
367+
val maxSkip = if (nonEmptyLines.isEmpty) 0 else nonEmptyLines.map(line => line.iterator.takeWhile(_ == ' ').size).min
368368

369369
// remove common whitespace prefix
370370
lines.map(line => if (line.trim.nonEmpty) line.substring(maxSkip) else line).mkString("\n")

0 commit comments

Comments
 (0)