Comments (3)
yeah, that sounds reasonable. Thanks for the example with screenshots.
from ansi-to-html.
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?
from ansi-to-html.
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
and #55 may have some impact on this issue.
let me know if you run into any complications
from ansi-to-html.
Related Issues (20)
- Infinite loop with specific ANSI string HOT 2
- (love) Just to tell you how great your software is
- Support for erase-line (\x1b[2K) and \r
- Types HOT 7
- underline stickiness HOT 7
- Factor out generic parser and add ANSI-to-browser-console-log HOT 1
- Multi `\r` makes following message disappear HOT 3
- Performance issue because of lots of nested layers HOT 4
- No support to convert \t? HOT 2
- Support for `Reset all attributes` sequence HOT 5
- Failure on \r sequences HOT 11
- Ship ES6 module HOT 3
- Output is broken when input stream gets chunked in the middle of an escape sequence
- Add support for PTY pseudo terminal HOT 1
- RangeError: Maximum call stack size exceeded HOT 1
- [Question] HTML to Text output HOT 3
- CVE-2021-23424L : ansi-html (0.0.7) Security Vulnerability issue HOT 2
- HOW_TO for Dummies
- Suggestion: Have CSS classes instead of styles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansi-to-html.