mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
preserve whitespace when pasting text
This commit is contained in:
parent
288ab2f8bf
commit
080118876a
1 changed files with 4 additions and 1 deletions
|
@ -938,7 +938,10 @@ class EditorWebView(AnkiWebView):
|
|||
|
||||
# normal text; convert it to HTML
|
||||
txt = html.escape(txt)
|
||||
txt = txt.replace("\n", "<br>")
|
||||
txt = txt.replace("\n", "<br>")\
|
||||
.replace("\t", " "*4)\
|
||||
.replace(" ", " ")
|
||||
|
||||
return txt
|
||||
|
||||
def _processHtml(self, mime):
|
||||
|
|
Loading…
Reference in a new issue