From 318765cb2e9fde6a44c3604c605565586aa9c843 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 29 Jan 2019 08:29:01 +1000 Subject: [PATCH] remove another newline case from empty fields thanks to dlon: https://github.com/dae/anki/pull/273 --- aqt/editor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aqt/editor.py b/aqt/editor.py index 87012eab0..aa8c28f86 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -289,7 +289,8 @@ class Editor: print("uncaught cmd", cmd) def mungeHTML(self, txt): - txt = re.sub(r"
$", "", txt) + if txt in ('
', '

'): + return '' return txt # Setting/unsetting the current note