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
This commit is contained in:
Damien Elmes 2020-04-13 08:34:17 +10:00
parent 0c5f22f4ae
commit e838769d02

View File

@ -295,8 +295,8 @@ function wrapIntoText(front, back) {
function wrapInternal(front, back, plainText) { function wrapInternal(front, back, plainText) {
if (currentField.dir === "rtl") { if (currentField.dir === "rtl") {
front = "‫" + front + "‬"; front = "⁨" + front + "⁩";
back = "‫" + back + "‬"; back = "⁨" + back + "⁩";
} }
const s = window.getSelection(); const s = window.getSelection();
let r = s.getRangeAt(0); let r = s.getRangeAt(0);