Fix regression that caused only foreground to be parsed if there's foreground
AND background formatting (src.utils.irc)
This commit is contained in:
parent
8f4312d002
commit
3b75519fb0
1 changed files with 2 additions and 1 deletions
|
@ -226,10 +226,11 @@ def parse_format(s: str) -> str:
|
||||||
background = _color_match(match.group(2), False)
|
background = _color_match(match.group(2), False)
|
||||||
|
|
||||||
if foreground:
|
if foreground:
|
||||||
|
replace += foreground
|
||||||
has_foreground = True
|
has_foreground = True
|
||||||
if background:
|
if background:
|
||||||
|
replace += background
|
||||||
has_background = True
|
has_background = True
|
||||||
replace += foreground or background
|
|
||||||
else:
|
else:
|
||||||
if has_foreground:
|
if has_foreground:
|
||||||
has_foreground = False
|
has_foreground = False
|
||||||
|
|
Loading…
Reference in a new issue