From e838769d02adbbe262b47cc0788ea65245db92f9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 13 Apr 2020 08:34:17 +1000 Subject: [PATCH] use isolation characters instead of direction markers in cloze handling https://anki.tenderapp.com/discussions/ankidesktop/40443-improper-location-of-c1foo-on-ltr-text-in-an-rtl-cloze-field --- qt/ts/src/editor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/ts/src/editor.ts b/qt/ts/src/editor.ts index eea5fd8c5..ab373fd38 100644 --- a/qt/ts/src/editor.ts +++ b/qt/ts/src/editor.ts @@ -295,8 +295,8 @@ function wrapIntoText(front, back) { function wrapInternal(front, back, plainText) { if (currentField.dir === "rtl") { - front = "‫" + front + "‬"; - back = "‫" + back + "‬"; + front = "⁨" + front + "⁩"; + back = "⁨" + back + "⁩"; } const s = window.getSelection(); let r = s.getRangeAt(0);