emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 cd51d9c7ab: Fix handling of brackets in BPA


From: Eli Zaretskii
Subject: emacs-28 cd51d9c7ab: Fix handling of brackets in BPA
Date: Thu, 3 Mar 2022 07:47:35 -0500 (EST)

branch: emacs-28
commit cd51d9c7ab5914fb58cbba6ae7bf5d53f7fef03f
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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)
---
 src/bidi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/bidi.c b/src/bidi.c
index 30a3be6c94..5f47d9e9a7 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -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;
            }
        }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]