1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:17:34 +00:00

LibUnicode: Check word break when deciding on case-ignorable code points

This commit is contained in:
Timothy Flynn 2021-07-27 18:27:59 -04:00 committed by Andreas Kling
parent 12fb3ae033
commit 7827aede6f
2 changed files with 16 additions and 2 deletions

View file

@ -63,9 +63,19 @@ static bool is_case_ignorable(UnicodeData const& unicode_data)
case GeneralCategory::Sk:
return true;
default:
// FIXME: Handle word break properties (auxiliary/WordBreakProperty.txt).
return false;
break;
}
switch (unicode_data.word_break_property) {
case WordBreakProperty::MidLetter:
case WordBreakProperty::MidNumLet:
case WordBreakProperty::SingleQuote:
return true;
default:
break;
}
return false;
}
static bool is_final_code_point(Utf8View const& string, size_t index, size_t byte_length)