diff --git a/aqt/editor.py b/aqt/editor.py index 2c6dafee0..ca9abc986 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -945,7 +945,7 @@ class EditorWebView(AnkiWebView): # if there's more than one consecutive space, # use non-breaking spaces for the second one on def repl(match): - return " " + match.group(1).replace(" ", " ") + return match.group(1).replace(" ", " ") + " " txt = re.sub(" ( +)", repl, txt) return txt