Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Text::ANSI::Util for wrapping "colorful" text

by ibm1620 (Hermit)
on Aug 07, 2022 at 22:07 UTC ( [id://11146011]=note: print w/replies, xml ) Need Help??


in reply to Re: Text::ANSI::Util for wrapping "colorful" text
in thread Text::ANSI::Util for wrapping "colorful" text

I notice that you're inserting \e[m before line endings. Apparently neither ta_length() nor ta_pad() can deal with this sequence (i.e. treat it as non-printing). I changed the two places in your code where you insert that sequence to insert \e[0m instead, and it passed my limited testing.

I don't know if that's the right fix, though. :-)

Replies are listed 'Best First'.
Re^3: Text::ANSI::Util for wrapping "colorful" text
by tybalt89 (Monsignor) on Aug 08, 2022 at 00:08 UTC

    The sequence \e[m is exactly the same as \e[0m (according to wikipedia);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11146011]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-20 13:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found