Skip to content

Commit 2ced48a

Browse files
grapheme_segmenter: Fix case where (RI x any) would mandate not to break, which is wrong.
1 parent 72d896f commit 2ced48a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/unicode/grapheme_segmenter.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ class grapheme_segmenter
138138
// GB12/GB13: Do not break within emoji flag sequences.
139139
// That is, do not break between regional indicator (RI) symbols
140140
// if there is an odd number of RI characters before the break point.
141-
if (A == Grapheme_Cluster_Break::Regional_Indicator
142-
|| B == Grapheme_Cluster_Break::Regional_Indicator)
141+
if (A == Grapheme_Cluster_Break::Regional_Indicator && A == B)
143142
return false;
144143

145144
// GB999: Otherwise, break everywhere.

0 commit comments

Comments
 (0)