You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is almost similar to #46 and the work done in #106, but I think it should be somewhat genericized.
Specifically, I'm using prettytable for an IRC bot, and IRC uses a different kind of format for colors: /\x03([\d]{2}(,[\d]{2})?)?/ is a rough estimate of the regex involved, but essentially I may print something that, raw, looks like \x0313foo\x03, which shows up as foo but in pink. Notice that the two unprintable characters are fine here, but there are two usually printable characters (13) whose purpose is overriden and "eaten up" by the IRC client when formatting.
As a result, if I try to use this in a table, my columns will be missing two characters when it comes to padding because the display width is calculated to be 2 characters longer than it should be. Now, I don't think we should put an IRC color formatting regex in there for all purposes since not everyone would be using it. Perhaps it could be added as a crate feature?
The text was updated successfully, but these errors were encountered:
This is almost similar to #46 and the work done in #106, but I think it should be somewhat genericized.
Specifically, I'm using
prettytable
for an IRC bot, and IRC uses a different kind of format for colors:/\x03([\d]{2}(,[\d]{2})?)?/
is a rough estimate of the regex involved, but essentially I may print something that, raw, looks like\x0313foo\x03
, which shows up asfoo
but in pink. Notice that the two unprintable characters are fine here, but there are two usually printable characters (13
) whose purpose is overriden and "eaten up" by the IRC client when formatting.As a result, if I try to use this in a table, my columns will be missing two characters when it comes to padding because the display width is calculated to be 2 characters longer than it should be. Now, I don't think we should put an IRC color formatting regex in there for all purposes since not everyone would be using it. Perhaps it could be added as a crate feature?
The text was updated successfully, but these errors were encountered: