Merge pull request #2764 from InspectorCaracal/fix-text2html-normal
Fix ANSI_NORMAL override in text2html
This commit is contained in:
commit
b1d611c6ca
1 changed files with 3 additions and 3 deletions
|
|
@ -234,9 +234,9 @@ class TextToHTMLparser(object):
|
||||||
|
|
||||||
for i, substr in enumerate(str_list):
|
for i, substr in enumerate(str_list):
|
||||||
# reset all current styling
|
# reset all current styling
|
||||||
if substr == ANSI_NORMAL and not clean:
|
if substr == ANSI_NORMAL:
|
||||||
# replace with close existing tag
|
# close any existing span if necessary
|
||||||
str_list[i] = "</span>"
|
str_list[i] = "</span>" if not clean else ""
|
||||||
# reset to defaults
|
# reset to defaults
|
||||||
classes = []
|
classes = []
|
||||||
clean = True
|
clean = True
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue