You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I found out the very hard way (half of my output not showing and an hour of debugging), some programs throw a color change in their output between a CR and a LF. I.e. [CR][ESC][31m[LF]
AnsiToHtmlConverter.php erases a line followd by [CR][color change][LF] since it thinks the color change is text at the beginning of a new line so it "overwrites" (deletes) the old line. It isn't Terminals like Putty will handle this correctly.
Proposed fix: for me this change in AnsiToHtmlConverter.php (line 50) worked.
As I found out the very hard way (half of my output not showing and an hour of debugging), some programs throw a color change in their output between a CR and a LF. I.e. [CR][ESC][31m[LF]
AnsiToHtmlConverter.php erases a line followd by [CR][color change][LF] since it thinks the color change is text at the beginning of a new line so it "overwrites" (deletes) the old line. It isn't Terminals like Putty will handle this correctly.
Proposed fix: for me this change in AnsiToHtmlConverter.php (line 50) worked.
$text = preg_replace('#^.*\r((\x9B|\x1B\[)[0-?]*[ -\/]*[@-~])*(?!\n)#ms', '', $text);
Probably the regex can be a bit simpler (I included all ANSI codes in the regex, that's overkill. I took it from https://stackoverflow.com/questions/14693701/how-can-i-remove-the-ansi-escape-sequences-from-a-string-in-python#33925425 ).
The text was updated successfully, but these errors were encountered: