Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/heavy-clouds-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"unicode-segmenter": patch
---

Fix GB9c rule; reset internal "InCB=Consonant" state properly.

So giving the following input:

```
# Malayalam KA + Virama + SPACE + VA
"क्‌ क"
```

Will now produces three sperated segments correctly.

Thanks to @spaceemotion for reporting this issue.
1 change: 1 addition & 0 deletions src/grapheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export function* graphemeSegments(input) {

// Reset segment state
emoji = false;
consonant = false;
riCount = 0;
index = cursor;
_catBegin = catAfter;
Expand Down
1 change: 1 addition & 0 deletions test/grapheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ test('counterexamples', async t => {
' जा',
' କା',
' ଶ୍ୟା',
'ക് വ',
];

for (let counter of counterExamples) {
Expand Down
Loading