From 29a53b268f78677d98bc3199ce35a0e60e41dea5 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 14 Jan 2011 00:31:07 +0900 Subject: [PATCH] strip qt's rtl marker --- anki/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anki/utils.py b/anki/utils.py index 7c3488d62..53c646422 100644 --- a/anki/utils.py +++ b/anki/utils.py @@ -157,6 +157,8 @@ def tidyHTML(html): html = re.sub(u'

(.*?)

', u'\\1
', html) html = re.sub(u'
$', u'', html) html = re.sub(u"^
(.*)
$", u"\\1", html) + # this is being added by qt's html editor, and leads to unwanted spaces + html = re.sub(u"^

(.*?)

$", u'\\1', html) return html def entsToTxt(html):