preserve whitespace when pasting text
This commit is contained in:
parent
288ab2f8bf
commit
080118876a
@ -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 New Issue
Block a user