rburns / ansi-to-html

Convert ansi escaped text streams to html.
MIT License
357 stars 48 forks source link

Support [K #12

Closed biffen closed 10 years ago

biffen commented 10 years ago

(I found this problem when using atom-build (which uses ansi-to-html), but it appears the issue is in ansi-to-html.)

Currently, the escape sequence [K (EL – Erase in Line) will produce a K in the output.

For instance, GCC with -fdiagnostics-color produces a lot of these, so the HTML-ified output is a mess.

I'm guessing implementing it would be somewhat tricky, but at least dropping the Ks would be a huge improvement.

rburns commented 10 years ago

yeah, looks tricky to implement https://en.wikipedia.org/wiki/ANSI_escape_code#EL dropping them for now sounds good.

rburns commented 10 years ago

I think the changes on this branch https://github.com/rburns/ansi-to-html/tree/drop-erase-inline behave correctly. Is it convenient for you to test before merging it?

biffen commented 10 years ago

Just got a chance to test it, and sure enough it seems to work. :smile: That was a quick response.

rburns commented 10 years ago

The fix is in the 0.2.1 release. Thanks.