mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
prefix non-breaking spaces
https://anki.tenderapp.com/discussions/ankidesktop/34512-first-space-is-omitted-when-pasting
This commit is contained in:
parent
47478e584f
commit
c7201b0c3a
1 changed files with 1 additions and 1 deletions
|
@ -945,7 +945,7 @@ class EditorWebView(AnkiWebView):
|
||||||
# if there's more than one consecutive space,
|
# if there's more than one consecutive space,
|
||||||
# use non-breaking spaces for the second one on
|
# use non-breaking spaces for the second one on
|
||||||
def repl(match):
|
def repl(match):
|
||||||
return " " + match.group(1).replace(" ", " ")
|
return match.group(1).replace(" ", " ") + " "
|
||||||
txt = re.sub(" ( +)", repl, txt)
|
txt = re.sub(" ( +)", repl, txt)
|
||||||
|
|
||||||
return txt
|
return txt
|
||||||
|
|
Loading…
Reference in a new issue