Skip to content

Commit

Permalink
Use line-by-line translation of Ansi.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Olafur Pall Geirsson committed Apr 20, 2020
1 parent 6b6fd95 commit e367f1a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ object AnsiColors {
if (s == null) {
null
} else {
val r = new StringBuilder()
val len = s.length
val r = new java.lang.StringBuilder(len)
var i = 0
while (i < len) {
val c = s.charAt(i)
if (c == '\u001B') {
i += 1
while (i < len && s.charAt(i) != 'm') i += 1
} else {
r += c
r.append(c)
}
i += 1
}
r.mkString
r.toString()
}
}

Expand Down

0 comments on commit e367f1a

Please # to comment.