From 8cceb248579141183c5864a9ab3c3ddd72f20850 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):