Closed dfaust closed 1 year ago
Why do you need this?
For testing. This allows seeing the colored output directly in the tests.
I just pushed an updated version, which adds a reset code at the end of each line.
This is necessary because rows_formatted
returns each line in an "undefined state".
Yes, there is some code duplication, the problem is, that contents
returns a String, while contents_formatted
returns a Vecrows
returns a String and rows_formatted
returns a Vec
One way would be for the contents
method to turn the strings into vecs, process them and at the end turn the result vec back into a string.
Okay, thanks!
This method is almost identical to
contents
, but it includes VT-100 codes.