1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

Fix handling of brackets in BPA

* src/bidi.c (bidi_resolve_brackets): Fix implementation of UBA's
N0 rule when there are no strong directional characters inside the
bracketed pair.  (Bug#54219)
This commit is contained in:
Eli Zaretskii 2022-03-03 14:46:20 +02:00
parent 225e0d6047
commit cd51d9c7ab

View File

@ -2924,7 +2924,8 @@ bidi_resolve_brackets (struct bidi_it *bidi_it)
eassert (bidi_it->bracket_pairing_pos > bidi_it->charpos);
if (bidi_it->bracket_enclosed_type == embedding_type) /* N0b */
type = embedding_type;
else
else if (bidi_it->bracket_enclosed_type == STRONG_L /* N0c, N0d */
|| bidi_it->bracket_enclosed_type == STRONG_R)
{
switch (bidi_it->prev_for_neutral.type)
{
@ -2944,6 +2945,7 @@ bidi_resolve_brackets (struct bidi_it *bidi_it)
break;
default:
/* N0d: Do not set the type for that bracket pair. */
/* (Actuallly, this shouldn't happen.) */
break;
}
}