Skip to content

Commit 7b60cfe

Browse files
committed
test
1 parent 60beb45 commit 7b60cfe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/grapheme.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ export function* graphemeSegments(input) {
7474
/** InCB=Linker */
7575
let linker = false;
7676

77+
/** InCB=Consonant InCB=Linker x InCB=Consonant */
78+
let incb = false;
79+
7780
let index = 0;
7881

7982
/** Beginning category of a segment */
@@ -83,9 +86,6 @@ export function* graphemeSegments(input) {
8386
let _hd = cp;
8487

8588
while (cursor < len) {
86-
/** InCB=Consonant InCB=Linker x InCB=Consonant */
87-
let incb = false;
88-
8989
cp = /** @type {number} */ (input.codePointAt(cursor));
9090
catAfter = cat(cp);
9191

@@ -116,12 +116,12 @@ export function* graphemeSegments(input) {
116116

117117
// flush
118118
emoji = false;
119-
consonant = false;
119+
incb = false;
120120
index = cursor;
121121
_catBegin = catAfter;
122122
_hd = cp;
123123

124-
} else if (cp >= 2325) {
124+
} else {
125125
// Note: Avoid InCB state checking much as possible
126126
// Update InCB state only when continuing within a segment
127127
if (!consonant && catBefore === 0)

0 commit comments

Comments
 (0)