Skip to content

Commit 315aa3c

Browse files
committed
move linker state reset
1 parent bf7b3c1 commit 315aa3c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Since [Hermes doesn't support the `Intl.Segmenter` API](https://github.com/faceb
215215

216216
| Name | Unicode® | ESM? | Size | Size (min) | Size (min+gzip) | Size (min+br) | Size (min+zstd) |
217217
|------------------------------|----------|------|----------:|-----------:|----------------:|--------------:|----------------:|
218-
| `unicode-segmenter/grapheme` | 16.0.0 | ✔️ | 10,751 | 6,680 | 3,370 | 2,757 | 3,496 |
218+
| `unicode-segmenter/grapheme` | 16.0.0 | ✔️ | 10,774 | 6,675 | 3,368 | 2,755 | 3,497 |
219219
| `graphemer` | 15.0.0 | ✖️ ️| 410,435 | 95,104 | 15,752 | 10,660 | 15,911 |
220220
| `grapheme-splitter` | 10.0.0 | ✖️ | 122,254 | 23,682 | 7,852 | 4,802 | 6,753 |
221221
| `@formatjs/intl-segmenter`* | 15.0.0 | ✖️ | 603,510 | 369,673 | 72,273 | 49,530 | 68,027 |
@@ -231,7 +231,7 @@ Since [Hermes doesn't support the `Intl.Segmenter` API](https://github.com/faceb
231231

232232
| Name | Bytecode size | Bytecode size (gzip)* |
233233
|------------------------------|--------------:|----------------------:|
234-
| `unicode-segmenter/grapheme` | 20,351 | 11,431 |
234+
| `unicode-segmenter/grapheme` | 20,295 | 11,420 |
235235
| `graphemer` | 134,089 | 31,766 |
236236
| `grapheme-splitter` | 63,946 | 19,162 |
237237

src/grapheme.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ export function* graphemeSegments(input) {
135135
// GB9c: InCB=Consonant InCB=Extend* InCB=Linker InCB=Extend* × InCB=Consonant
136136
else if (catAfter === 0 && consonant && linker && isIndicConjunctConsonant(cp)) {
137137
boundary = false;
138-
linker = false;
139138
}
140139
// else GB999: ÷ Any
141140

@@ -169,6 +168,8 @@ export function* graphemeSegments(input) {
169168
}
170169
if (consonant && catAfter === 3) {
171170
linker = linker || isIndicConjunctLinker(cp);
171+
} else {
172+
linker = false;
172173
}
173174
}
174175
}

0 commit comments

Comments
 (0)