From 88fd31a099a9f5c1273766e27cb271ce383369b4 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Fri, 17 Sep 2021 20:12:11 +0200 Subject: [PATCH] Ugly fix: do not execute moveCursorPastPostfix when front includes "anki-mathjax" --- ts/lib/wrap.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ts/lib/wrap.ts b/ts/lib/wrap.ts index 7f97c7c1b..18cc0916a 100644 --- a/ts/lib/wrap.ts +++ b/ts/lib/wrap.ts @@ -38,7 +38,12 @@ export function wrapInternal( document.execCommand("inserthtml", false, new_); } - if (!span.innerHTML) { + if ( + !span.innerHTML && + /* ugly solution: treat differently than other wraps */ !front.includes( + "