Skip to content

Commit

Permalink
Fix grapheme handling for extended+ zwj emoji
Browse files Browse the repository at this point in the history
Using fix proposed here JuliaLang/julia#37680
  • Loading branch information
archermarx authored Nov 19, 2020
1 parent 6f7d730 commit ff480f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utf8proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ static utf8proc_bool grapheme_break_extended(int lbc, int tbc, utf8proc_int32_t
else
*state = tbc;
}
else if (*state == UTF8PROC_BOUNDCLASS_EXTEND && tbc == UTF8PROC_BOUNDCLASS_ZWJ)
+ *state = UTF8PROC_BOUNDCLASS_E_ZWG;
else
*state = tbc;
}
Expand Down

0 comments on commit ff480f1

Please sign in to comment.