Closed henryiii closed 1 month ago
I'll need to look at this, I never tried colored output and I'm not surprised it breaks. One issue for sure is that the escape sequences are considered normal text so that causes what you see in the image where the coloring of each line at the end is missing. But yes, there's clearly more going on.
If I find the time I wouldn't mind taking a jab at this issue. I believe we can just escape ansi codes before calculating the padding, something like this crate might do the job if we don't mind introducing dependencies.
If you'd like to give it a shot, go for it. The execution output is handled here and the attribute you want to change should be this one. Ideally we'd compute the real length only once and then store it so this thing would need to have more than just a string.
This was fixed in #315.
Thanks!
That's a link to an issue, by the way, not a PR. I think you meant #316.
If a command produces colored output, it messes up the code box. It almost works, I think it's just counting the control sequence length incorrectly.