Coder Social home page Coder Social logo

^[(B Not supported about ansi-to-html HOT 7 CLOSED

rburns avatar rburns commented on August 22, 2024
^[(B Not supported

from ansi-to-html.

Comments (7)

rburns avatar rburns commented on August 22, 2024

yes, a no-op sounds right.

from ansi-to-html.

ajmas avatar ajmas commented on August 22, 2024

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.

rburns avatar rburns commented on August 22, 2024

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.

ajmas avatar ajmas commented on August 22, 2024

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.

rburns avatar rburns commented on August 22, 2024

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.

ajmas avatar ajmas commented on August 22, 2024

Nothing immediate that was impacting me - thanks

from ansi-to-html.

rburns avatar rburns commented on August 22, 2024

#40

from ansi-to-html.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.