plugin text_syntaxes: rstrip the conversion result to avoid new lines systematically added by converters (e.g. html2text do this)

This commit is contained in:
souliane 2014-02-12 15:21:00 +01:00
commit c2e4e9f8f9

View file

@ -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):