Closed abitrolly closed 4 years ago
there are some tests here https://github.com/rburns/ansi-to-html/blob/master/test/ansi_to_html.js#L115 which indicate that the reset code is supported. do you have an example of a situation that isn't working? perhaps a complex case of this variety https://github.com/rburns/ansi-to-html/blob/master/test/ansi_to_html.js#L122 which fails.
Unfortunately, I didn't record the test case and I can't get back to it. The converter still has more serious problem with output https://travis-ci.community/t/ansi-logs-missing-colors-and-formatting-problems/9489/3
that appears to reference a different package https://www.npmjs.com/package/ansiparse https://github.com/mmalecki/ansiparse
@rburns my bad. I guess I was trying to print https://api.travis-ci.com/v3/job/366719641/log.txt with ansi-to-html
. Unfortunately, I can not test anything right now, because bundle.run
is down https://github.com/Rich-Harris/packd/issues/136 and ansi-to-html
does not ship as ES6 module https://github.com/rollup/rollup/wiki/pkg.module which my scripts could use directly.
Maybe I was confused by black background by default. In any case it seems to work with the following snippet.
Are there any reasons why reset all attributes
ESC[0m
code is not supported?https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters
https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit