File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments