Skip to content

Commit 881acd5

Browse files
committed
fix typo: ris -> ri
1 parent fa2356d commit 881acd5

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/grapheme.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export function* graphemeSegments(input) {
6262
/** @type {GraphemeCategoryNum} Category of codepoint immediately preceding cursor. */
6363
let catAfter = 0;
6464

65-
/** The number of RIS codepoints preceding `cursor`. */
66-
let risCount = 0;
65+
/** The number of RI codepoints preceding `cursor`. */
66+
let riCount = 0;
6767

6868
/**
6969
* Emoji state for GB11: tracks if we've seen Extended_Pictographic followed by Extend* ZWJ
@@ -117,8 +117,8 @@ export function* graphemeSegments(input) {
117117
}
118118
// GB12, GB13: RI × RI (odd count means no break)
119119
else if (catBefore === 10 && catAfter === 10) {
120-
// risCount is count BEFORE current RI, so odd means this is 2nd, 4th, etc.
121-
boundary = risCount++ % 2 === 1;
120+
// riCount is count BEFORE current RI, so odd means this is 2nd, 4th, etc.
121+
boundary = riCount++ % 2 === 1;
122122
}
123123
// GB6: L × (L | V | LV | LVT)
124124
else if (catBefore === 5) {
@@ -150,7 +150,7 @@ export function* graphemeSegments(input) {
150150

151151
// Reset segment state
152152
emoji = false;
153-
risCount = 0;
153+
riCount = 0;
154154
index = cursor;
155155
_catBegin = catAfter;
156156
_hd = cp;

0 commit comments

Comments
 (0)