Now About Social Code
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-10-06 22:52:49 +0100
committerLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-10-06 22:52:49 +0100
commitc950b0272a8240dccef240078f716947f0e013ff (patch)
tree4e0e76f53669275cd72d1bef7e85b49c98975cd0
parent4ddbd0142fec70c8c9575d6f2f9b5ef93a93bd90 (diff)
color: Fix color parsing of (ATTR)EXT+~+STD
This pattern was used in the `relay.list` buffer and caused render artifiacts if we don't remove the color from the text.
-rw-r--r--src/relay/color.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/relay/color.py b/src/relay/color.py
index 61b70ff..fdb5b4a 100644
--- a/src/relay/color.py
+++ b/src/relay/color.py
@@ -31,7 +31,7 @@ RE_COLOR_EXT = r'(?:@%s\d{5})' % RE_COLOR_ATTRS
RE_COLOR_ANY = r'(?:%s|%s)' % (RE_COLOR_STD, RE_COLOR_EXT)
# \x19: color code, \x1A: set attribute, \x1B: remove attribute, \x1C: reset
RE_COLOR = re.compile(
- r'(\x19(?:\d{2}|F%s|B\d{2}|B@\d{5}|E|\\*%s(~%s)?|@\d{5}|b.|\x1C))|\x1A.|'
+ r'(\x19(?:\d{2}|F%s|B\d{2}|B@\d{5}|E|\\*%s(~%s)?|@\d{5}|b.|\x1C|[*][@]\d{5}[~]\d{2}))|\x1A.|'
r'\x1B.|\x1C'
% (RE_COLOR_ANY, RE_COLOR_ANY, RE_COLOR_ANY))