Skip to content

Commit d8f8976

Browse files
committed
Fix scala#3614: Do not allow the SyntaxFormatter to recolor code
1 parent fe1c05e commit d8f8976

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/printing/Highlighting.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ object Highlighting {
5353
}
5454

5555
case class NoColor(text: String) extends Highlight(Console.RESET)
56+
case class AlreadyColored(text: String) extends Highlight(Console.RESET)
5657

5758
case class Red(text: String) extends Highlight(Console.RED)
5859
case class Blue(text: String) extends Highlight(Console.BLUE)

compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ object messages {
719719
.map(_.paramName.unexpandedName.show)
720720
.mkString("[", ", ", "]")
721721

722-
private val actualArgString = actual.map(_.show).mkString("[", ", ", "]")
722+
private val actualArgString = AlreadyColored(actual.map(_.show).mkString("[", ", ", "]"))
723723

724724
private val prettyName =
725725
try

0 commit comments

Comments
 (0)