[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5e8fbf7789: Clean up implementation of N0 per UAX#9
From: |
Eli Zaretskii |
Subject: |
master 5e8fbf7789: Clean up implementation of N0 per UAX#9 |
Date: |
Tue, 15 Mar 2022 15:23:03 -0400 (EDT) |
branch: master
commit 5e8fbf7789613511061d78a42ca7f91bc831f786
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Clean up implementation of N0 per UAX#9
* src/bidi.c (bidi_resolve_brackets): Instead of requiring
prev_for_neutral's type to be known, fall back on SOS, per
the UBA.
---
src/bidi.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/bidi.c b/src/bidi.c
index 44b7422bdc..4d2c74b17c 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -2927,8 +2927,11 @@ bidi_resolve_brackets (struct bidi_it *bidi_it)
else if (bidi_it->bracket_enclosed_type == STRONG_L /* N0c, N0d */
|| bidi_it->bracket_enclosed_type == STRONG_R)
{
- eassert (bidi_it->prev_for_neutral.type != UNKNOWN_BT);
- switch (bidi_it->prev_for_neutral.type)
+ bidi_type_t prev_type_for_neutral = bidi_it->prev_for_neutral.type;
+
+ if (prev_type_for_neutral == UNKNOWN_BT)
+ prev_type_for_neutral = embedding_type;
+ switch (prev_type_for_neutral)
{
case STRONG_R:
case WEAK_EN:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 5e8fbf7789: Clean up implementation of N0 per UAX#9,
Eli Zaretskii <=