From 3e9be0155e0a85fd6bd1d3395d8b82891a32d392 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 26 Jan 2018 19:18:24 +1000 Subject: [PATCH] preserve newlines when pasting plain text --- aqt/editor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aqt/editor.py b/aqt/editor.py index a97c31511..372ded35b 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -851,6 +851,7 @@ class EditorWebView(AnkiWebView): # normal text; convert it to HTML txt = html.escape(txt) + txt = txt.replace("\n", "
") return txt def _processHtml(self, mime):