mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
avoid possible performance hit
This commit is contained in:
parent
7451ad68b1
commit
de974f94db
1 changed files with 2 additions and 1 deletions
|
@ -1172,7 +1172,8 @@ class EditorWebView(AnkiWebView):
|
|||
|
||||
# try various content types in turn
|
||||
if mime.hasHtml():
|
||||
return mime.html().replace("<!--anki-->", ""), internal
|
||||
html_content = mime.html()[11:] if internal else mime.html()
|
||||
return html_content, internal
|
||||
|
||||
# favour url if it's a local link
|
||||
if mime.hasUrls() and mime.urls()[0].toString().startswith("file://"):
|
||||
|
|
Loading…
Reference in a new issue