Closed ghost closed 5 years ago
I have done a fix for that at https://github.com/chalk/slice-ansi/pull/18. Regarding the garbage tags, it's due how slice-ansi
works, because it doesn't maintain state, just only the last tag for the current color. By maintaining state, it could be able to remove the useless and closed ones, maybe could be done in another pull-request.
One way to do it:
I can't quite get the test cases, the output seems ok, but a lot of garbage tags e.g.: