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:
parent
ba1800cc61
commit
c2e4e9f8f9
1 changed files with 2 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue