Ugly fix: do not execute moveCursorPastPostfix when front includes "anki-mathjax"

This commit is contained in:
Henrik Giesel 2021-09-17 20:12:11 +02:00
parent c30ba6a3f6
commit 88fd31a099

View file

@ -38,7 +38,12 @@ export function wrapInternal(
document.execCommand("inserthtml", false, new_); document.execCommand("inserthtml", false, new_);
} }
if (!span.innerHTML) { if (
!span.innerHTML &&
/* ugly solution: treat <anki-mathjax> differently than other wraps */ !front.includes(
"<anki-mathjax"
)
) {
moveCursorPastPostfix(selection, back); moveCursorPastPostfix(selection, back);
} }
} }