Skip to content

Commit

Permalink
Sanitize ansi codes rate than throwing by default (#344)
Browse files Browse the repository at this point in the history
Generally better to leave weird codes in the output than to crash
  • Loading branch information
lihaoyi authored Aug 6, 2024
1 parent 54ad530 commit 6e37f70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.7-29-f2e220
0.11.11
2 changes: 1 addition & 1 deletion utest/src/utest/ufansi/Fansi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ object Str{
* input `CharSequence` contains an Ansi escape not
* recognized by Fansi as a valid color.
*/
def apply(raw: CharSequence, errorMode: ErrorMode = ErrorMode.Throw): ufansi.Str = {
def apply(raw: CharSequence, errorMode: ErrorMode = ErrorMode.Sanitize): ufansi.Str = {
// Pre-allocate some arrays for us to fill up. They will probably be
// too big if the input has any ansi codes at all but that's ok, we'll
// trim them later.
Expand Down

0 comments on commit 6e37f70

Please sign in to comment.