summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jose Colon Rodriguez2024-02-14 21:53:31 -0400
committerGravatar Jose Colon Rodriguez2024-02-14 21:53:31 -0400
commit2aa2f147a83cf1a882441ce833cdfc41324cf95a (patch)
tree88989b129b4b9f487478f63202098b50c3a73817 /src
parentemoji direct array access (diff)
downloadzg-2aa2f147a83cf1a882441ce833cdfc41324cf95a.tar.gz
zg-2aa2f147a83cf1a882441ce833cdfc41324cf95a.tar.xz
zg-2aa2f147a83cf1a882441ce833cdfc41324cf95a.zip
Combinedd Indic ifs
Diffstat (limited to 'src')
-rw-r--r--src/Grapheme.zig19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/Grapheme.zig b/src/Grapheme.zig
index 9c87364..d868ef7 100644
--- a/src/Grapheme.zig
+++ b/src/Grapheme.zig
@@ -238,14 +238,7 @@ pub fn graphemeBreak(
238 // GB9c: Indic Conjunct Break 238 // GB9c: Indic Conjunct Break
239 if (hasIndic(state) and 239 if (hasIndic(state) and
240 cp1_indic_prop == .Consonant and 240 cp1_indic_prop == .Consonant and
241 cp2_indic_prop == .Extend) 241 (cp2_indic_prop == .Extend or cp2_indic_prop == .Linker))
242 {
243 return false;
244 }
245
246 if (hasIndic(state) and
247 cp1_indic_prop == .Consonant and
248 cp2_indic_prop == .Linker)
249 { 242 {
250 return false; 243 return false;
251 } 244 }
@@ -258,15 +251,7 @@ pub fn graphemeBreak(
258 } 251 }
259 252
260 if (hasIndic(state) and 253 if (hasIndic(state) and
261 cp1_indic_prop == .Linker and 254 (cp1_indic_prop == .Linker or cp1_gbp_prop == .zwj) and
262 cp2_indic_prop == .Consonant)
263 {
264 unsetIndic(state);
265 return false;
266 }
267
268 if (hasIndic(state) and
269 cp1_gbp_prop == .zwj and
270 cp2_indic_prop == .Consonant) 255 cp2_indic_prop == .Consonant)
271 { 256 {
272 unsetIndic(state); 257 unsetIndic(state);