-
Notifications
You must be signed in to change notification settings - Fork 25
.format() color injection #16
Comments
Color.format() will return a Color instance which parses {green}, just as str.format() returns a str instance. If you don't want {green} to be parsed you'll need to feed it into str.format(). Something like |
But as soon as I convert it back to a |
Hmm, true. I should fix colorclass so you can do something like |
a way that lets you create a Color instance without invoking the parsing logic at all would be nice, too |
I'm not sure about that. My goal with colorclass was to mimic str. str.format() doesn't have such functionality. Hence why it supports escaping curly brackets with {{ and }}. |
that last one wasn't |
For #16. Option to disable parsing of curly brackets, leaving them as-is.
Extension of #16. Better to do this for Color() % str() and other operations.
Expected:
XXX: {green}moo{/green}
(withXXX:
in red)Actual:
XXX: moo
(withXXX:
in red andmoo
in green)This is especially annoying since it means one cannot use the
Color
class without the tag parsing.The text was updated successfully, but these errors were encountered: