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

LibUnicode: Handle code points that are both cased and case-ignorable

Apparently, some code points fit both categories, for example U+0345
(COMBINING GREEK YPOGEGRAMMENI). Handle this fact when determining if
a code point is a final code point in a string.
This commit is contained in:
Timothy Flynn 2021-07-27 18:47:41 -04:00 committed by Andreas Kling
parent dff156b7c6
commit c4bfda7f7f
2 changed files with 5 additions and 1 deletions

View file

@ -95,7 +95,7 @@ static bool is_final_code_point(Utf8View const& string, size_t index, size_t byt
if (!unicode_data.has_value())
return false;
if (is_cased_letter(*unicode_data))
if (is_cased_letter(*unicode_data) && !is_case_ignorable(*unicode_data))
++cased_letter_count;
else if (!is_case_ignorable(*unicode_data))
cased_letter_count = 0;