mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 06:07:11 -05:00
use text if the document has no html and stripHTML off
This commit is contained in:
parent
8fbf2cb412
commit
88c7717537
1 changed files with 2 additions and 1 deletions
|
|
@ -1024,7 +1024,8 @@ class FactEdit(QTextEdit):
|
||||||
if source.hasHtml() and "qrichtext" in unicode(source.html()):
|
if source.hasHtml() and "qrichtext" in unicode(source.html()):
|
||||||
self.insertHtml(source.html())
|
self.insertHtml(source.html())
|
||||||
return
|
return
|
||||||
if source.hasText() and ankiqt.mw.config['stripHTML']:
|
if source.hasText() and (ankiqt.mw.config['stripHTML'] or
|
||||||
|
not source.hasHtml()):
|
||||||
txt = unicode(source.text())
|
txt = unicode(source.text())
|
||||||
l = txt.lower()
|
l = txt.lower()
|
||||||
if l.startswith("http://") or l.startswith("file://"):
|
if l.startswith("http://") or l.startswith("file://"):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue