-
-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Labels
Description
I browsed the code on github and think colorize(String text, String ansiCode) will not handle trailing new lines correctly, because split will not return them. See https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#split(java.lang.String)
" ... Trailing empty strings are therefore not included in the resulting array. ... "
I think the code gets in trouble with:
"a\n\n\n" because split will result in ["a"]
"a\n\n\b" because endsWithLine is set to false and therefore no new lines are added in the loop
Reactions are currently unavailable