mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Bug 1640408 - Check Unicode general category to identify punctuation marks in word-breaker. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D77655
This commit is contained in:
parent
58f4d468c7
commit
1cd6eafa23
@ -94,6 +94,9 @@ WordBreakClass WordBreaker::GetClass(char16_t c) {
|
||||
if (c == 0x00A0 /*NBSP*/) {
|
||||
return kWbClassSpace;
|
||||
}
|
||||
if (GetGenCategory(c) == nsUGenCategory::kPunctuation) {
|
||||
return kWbClassPunct;
|
||||
}
|
||||
if (IsScriptioContinua(c)) {
|
||||
return kWbClassScriptioContinua;
|
||||
}
|
||||
@ -111,6 +114,9 @@ WordBreakClass WordBreaker::GetClass(char16_t c) {
|
||||
if (IS_HALFWIDTHKATAKANA(c)) {
|
||||
return kWbClassHWKatakanaLetter;
|
||||
}
|
||||
if (GetGenCategory(c) == nsUGenCategory::kPunctuation) {
|
||||
return kWbClassPunct;
|
||||
}
|
||||
if (IsScriptioContinua(c)) {
|
||||
return kWbClassScriptioContinua;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user