Styling non-strings#40
Conversation
It's sneaky because it gives different results when under NO_COLORS and slips through without raising exceptions.
|
Not sure how you'd like to handle this. The thing that seems most obvious to me is for Strictly speaking, that won't be 100% backwards compatible, because you'll be executing the input's but since style_string freezes its input as a string at that time anyway, it's probably the only thing that makes sense, to do them both at the same time. |
|
And while I'm looking at ColorfulString, I notice Is that intentional? Should |
|
are you still interested in this? |
Here are a few test cases demonstrating failures when colorful makes ColorfulStrings out of non-string objects.
s.red(1) + s.red(2)case is particularly fun for generating quirky results that sneak by without raising exceptions.