From 8c7c5a3d147369f46ee1490e1d69871a9c56d20f Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Fri, 20 Oct 2023 15:09:49 -0400 Subject: [PATCH] fix GB9c logic --- utf8proc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/utf8proc.c b/utf8proc.c index 98dab52..b12d234 100644 --- a/utf8proc.c +++ b/utf8proc.c @@ -302,17 +302,11 @@ static utf8proc_bool grapheme_break_extended(int lbc, int tbc, int licb, int tic // Special support for GB9c: if (licb == UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT || state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT - || state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND_LINKER1) + || state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND) state_ibc = licb; - else if (state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND) - state_ibc = licb == UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER ? - UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND_LINKER1 : UTF8PROC_INDIC_CONJUNCT_BREAK_NONE; else if (state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER) state_ibc = licb == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND ? - UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND2 : UTF8PROC_INDIC_CONJUNCT_BREAK_NONE; - else if (state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND2) - state_ibc = licb == UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER ? - UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER: UTF8PROC_INDIC_CONJUNCT_BREAK_NONE; + UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER : licb; if (state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER && ticb == UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT) break_permitted = false;