changeset 836:2cc0201b4613

plugin text_syntaxes: rstrip the conversion result to avoid new lines systematically added by converters (e.g. html2text do this)
author souliane <souliane@mailoo.org>
date Wed, 12 Feb 2014 15:21:00 +0100
parents c00d90bce252
children eff944ff3e13
files src/plugins/plugin_misc_text_syntaxes.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_misc_text_syntaxes.py	Wed Feb 12 15:19:48 2014 +0100
+++ b/src/plugins/plugin_misc_text_syntaxes.py	Wed Feb 12 15:21:00 2014 +0100
@@ -216,6 +216,8 @@
         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):