diff options
author | mathieui <mathieui@mathieui.net> | 2011-11-11 23:55:31 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2011-11-11 23:55:31 +0100 |
commit | 632175b79fb4d15a2358fc0604fe1bb85a076188 (patch) | |
tree | 73d8629a8efe5cfd48e93640cb6e4debb3183278 | |
parent | ec7f0601c95cc89ba1427f6b8dc9ca06a49c4a11 (diff) | |
download | poezio-632175b79fb4d15a2358fc0604fe1bb85a076188.tar.gz poezio-632175b79fb4d15a2358fc0604fe1bb85a076188.tar.bz2 poezio-632175b79fb4d15a2358fc0604fe1bb85a076188.tar.xz poezio-632175b79fb4d15a2358fc0604fe1bb85a076188.zip |
Fix the xhtml parser (do not add wrong colors)
-rw-r--r-- | src/xhtml.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xhtml.py b/src/xhtml.py index 99e0bf01..e7a045fa 100644 --- a/src/xhtml.py +++ b/src/xhtml.py @@ -258,7 +258,9 @@ def xhtml_to_poezio_colors(text): if key == 'background-color': pass#shell += '\x191' elif key == 'color': - shell += '\x19%d}' % get_color(value) + color = get_color(value) + if color != -1: + shell += '\x19%d}' % color elif key == 'font-style': shell += '\x19i' elif key == 'font-weight': |