From c2e4e9f8f958c1ef5a89a4af31194237e026b314 Mon Sep 17 00:00:00 2001 From: souliane Date: Wed, 12 Feb 2014 15:21:00 +0100 Subject: [PATCH] plugin text_syntaxes: rstrip the conversion result to avoid new lines systematically added by converters (e.g. html2text do this) --- src/plugins/plugin_misc_text_syntaxes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/plugin_misc_text_syntaxes.py b/src/plugins/plugin_misc_text_syntaxes.py index 620e6d3b..7126bb85 100755 --- a/src/plugins/plugin_misc_text_syntaxes.py +++ b/src/plugins/plugin_misc_text_syntaxes.py @@ -216,6 +216,8 @@ class TextSyntaxes(object): else: d.addCallback(lambda xhtml: deferToThread(syntaxes[syntax_to]["from"], xhtml)) + # converters can add new lines that disturb the microblog change detection + d.addCallback(lambda text: text.rstrip()) return d def addSyntax(self, name, to_xhtml_cb, from_xhtml_cb, flags = None):