Comments (7)
yes, a no-op sounds right.
from ansi-to-html.
BTW I was looking at coding my own and I was able to establish the following rules, which may help with a general case:
// At this point we have already detected an escape char
if (escapeTxt === '[') {
// process until character
do {
character = text.charAt(++i)
escapeTxt += character;
} while(!isLetter(character) && i< text.length);
} else if (escapeTxt === '#') {
// process until digit
do {
character = text.charAt(++i)
escapeTxt += character;
} while(!isDigit(character) && i < text.length);
} else if (escapeTxt === '(' || escapeTxt === ')') {
// process another char
escapeTxt += text.charAt(++i);
} else {
// that's the escape
}
Feel free to leverage what you find useful.
from ansi-to-html.
I'd guess we can add a token to be removed here: https://github.com/rburns/ansi-to-html/blob/master/src/ansi_to_html.js#L342. I'll write a test to see if that works, a bit later.
If it was to be supported, rather than a no-op. What does the functionality look like?
from ansi-to-html.
Trying to understand myself. Based on the following document it would seem to be USACII:
https://www.in-ulm.de/~mascheck/various/alternate_charset/
Probably used to ensure that we are using printed characters, rather than line characters?
from ansi-to-html.
this appears to work: #40 Is there a category of similar codes which should be ignored, or is that one enough?
from ansi-to-html.
Nothing immediate that was impacting me - thanks
from ansi-to-html.
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
- inverse color is ignored HOT 3
- 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.