diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/xhtml.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/xhtml.py b/src/xhtml.py index 949044b1..d25500f0 100644 --- a/src/xhtml.py +++ b/src/xhtml.py @@ -174,10 +174,6 @@ colors = { log = logging.getLogger(__name__) -shell_colors_re = re.compile(r'(\[(?:\d+;)*(?:\d+m))') -start_indent_re = re.compile(r'\[0;30m\[0;37m ') -newline_indent_re = re.compile('\n\[0;37m ') - def get_body_from_message_stanza(message): """ Returns a string with xhtml markups converted to @@ -190,7 +186,6 @@ def get_body_from_message_stanza(message): return xhtml_to_poezio_colors(xhtml_body) return message['body'] - def xhtml_to_poezio_colors(text): def parse_css(css): def get_color(value): @@ -289,7 +284,7 @@ def xhtml_to_poezio_colors(text): if (elem.text and elem.tag != '{http://www.w3.org/1999/xhtml}a' and elem.tag != '{http://www.w3.org/1999/xhtml}br' and elem.tag != '{http://www.w3.org/1999/xhtml}img'): - message += elem.text.strip() + message += elem.text.replace('\n', '') if ('style' in elem.attrib and elem.tag != '{http://www.w3.org/1999/xhtml}br' and elem.tag != '{http://www.w3.org/1999/xhtml}em' |