Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix break Regional_Indicator #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 7 additions & 2 deletions unicorn/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,13 @@ namespace RS::Unicorn {
continue;
// Do not break between regional indicator symbols.
// GB8a. Regional_Indicator × Regional_Indicator
if (prev == P::Regional_Indicator && next == P::Regional_Indicator)
continue;
if (prev == P::Regional_Indicator && next == P::Regional_Indicator){
if (i >= 2) {
return i;
} else {
continue;
}
}
// Do not break before extending characters.
// GB9. × Extend
// Do not break before SpacingMarks, or after Prepend characters.
Expand Down