From f676a7aac93885f47d5a5c22c6d427a48ccaa450 Mon Sep 17 00:00:00 2001 From: InspectorCaracal <51038201+InspectorCaracal@users.noreply.github.com> Date: Thu, 9 Jun 2022 15:50:16 -0600 Subject: [PATCH] fix ANSI_NORMAL override in text2html resets states on ANSI_NORMAL flag regardless of `clean` status --- evennia/utils/text2html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evennia/utils/text2html.py b/evennia/utils/text2html.py index ab3f2930d6..1a0b2bf6cc 100644 --- a/evennia/utils/text2html.py +++ b/evennia/utils/text2html.py @@ -234,9 +234,9 @@ class TextToHTMLparser(object): for i, substr in enumerate(str_list): # reset all current styling - if substr == ANSI_NORMAL and not clean: - # replace with close existing tag - str_list[i] = "" + if substr == ANSI_NORMAL: + # close any existing span if necessary + str_list[i] = "" if not clean else "" # reset to defaults classes = [] clean = True