-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inverse color is ignored #59
Comments
yeah, that sounds reasonable. Thanks for the example with screenshots. |
I'd be interested in fixing this issue; but what would there need to be changed? @rburns could you point me in the right direction? |
probably, start with a test as I've made here https://github.com/rburns/ansi-to-html/compare/inverse-color. the first, I think is roughly correct. It tests setting inverse colors. and an empty one, which would test clearing those values. the latter empty test might not be necessary, or may look something like these reset to default color tests https://github.com/rburns/ansi-to-html/blob/inverse-color/test/ansi_to_html.js#L192-L204 but handling a different escape code. the test string is taken from the original post. I removed the trailing escape code. I'm not certain of it's functionality. it doesn't appear yet, in any of the tests. implementation would start here https://github.com/rburns/ansi-to-html/blob/inverse-color/src/ansi_to_html.js#L152 adding a case for the inverse escape code, which calls pushForegroundColor() and pushBackgroundColor() appropriately. trying to get that test to pass, by adjusting it, or other related code. and then doing some research and seeing if there are escape codes not yet implemented which need to take care to reverse the operation. It's also worth pointing out that either of these branches #57 let me know if you run into any complications |
I think swapping
fg
andbg
would be fine for this.This can be seen when using
ansiToHtml
with the output fromtsc
(typescript's compiler) - which usesinverse
for the "gutter" which includes the line numbers.ANSI
HTML
The text was updated successfully, but these errors were encountered: