Skip to content

Commit

Permalink
thcrap_tasofro: bidi: handle '\ '
Browse files Browse the repository at this point in the history
  • Loading branch information
brliron committed May 28, 2024
1 parent 4cd8f55 commit 45c88f3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions thcrap_tasofro/src/arabic_bidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ static std::tuple<wchar_t *, bool> arabic_escape_tags_for_bidi(const wchar_t *in
// Don't copy anything - we'll write this back in arabic_remote_escapes.
}
}
else if (wcsncmp(in + i, L"\\ ", 2) == 0) {
out[j] = LEFT_TO_RIGHT_OVERRIDE; j++;

out[j] = in[i];
i++; j++;
while (in[i] == L' ') {
out[j] = in[i];
i++; j++;
}

out[j] = POP_DIRECTIONAL_FORMATTING; j++;
}
else {
out[j] = in[i];
i++; j++;
Expand Down

0 comments on commit 45c88f3

Please sign in to comment.