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
5 changes: 5 additions & 0 deletions .changeset/short-toes-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"unicode-segmenter": patch
---

Fixed G9Bc edge case. The `0x0A4D` (Gurmukhi Sign Virama) was incorrectly treated as InCB=Linker.
1 change: 0 additions & 1 deletion src/grapheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ const PAIR = Uint8Array.from(grapheme_pairs);
function isLinker(cp) {
return cp === 0x094D // Devanagari Sign Virama
|| cp === 0x09CD // Bengali Sign Virama
|| cp === 0x0A4D // Gurmukhi Sign Virama
|| cp === 0x0ACD // Gujarati Sign Virama
|| cp === 0x0B4D // Oriya Sign Virama
|| cp === 0x0C4D // Telugu Sign Virama
Expand Down
4 changes: 4 additions & 0 deletions test/grapheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ test('counterexamples', async t => {
'क‌्क',
'क゙्क',
'ൎക്ക',
// GB9c: U+0A4D (Gurmukhi Sign Virama) is *not* InCB=Linker per DerivedCoreProperties.txt;
// the lib must not treat it as one even when it appears inside an InCB=Consonant run from another script
'\u0915\u0A4D\u0915', // DEVANAGARI KA + GURMUKHI VIRAMA + DEVANAGARI KA
'\u0A15\u0A4D\u0A15', // pure Gurmukhi KA + virama + KA (InCB=None - harmless)
// Hangul Jamo Extended-B boundaries; U+D7FC..U+D7FF are unassigned
'가퟼',
'ퟻ퟼',
Expand Down
Loading