# HG changeset patch # User souliane # Date 1392214860 -3600 # Node ID 2cc0201b4613b94276f871626a8217485c20a43f # Parent c00d90bce2521b9f413ab5f932c68c3ca4111d32 plugin text_syntaxes: rstrip the conversion result to avoid new lines systematically added by converters (e.g. html2text do this) diff -r c00d90bce252 -r 2cc0201b4613 src/plugins/plugin_misc_text_syntaxes.py --- 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):