ported from mozilla: Bug 1819025 - Don't consider following join-controls when determining whether a space is collapsible. r=emilio (fad4426b7b)

This commit is contained in:
roytam1 2024-06-08 12:10:00 +08:00
commit 854fac5c4c
3 changed files with 17 additions and 1 deletions

View file

@ -81,7 +81,7 @@ public:
static bool
IsSpaceCombiningSequenceTail(const char16_t* aChars, int32_t aLength) {
return aLength > 0 &&
(mozilla::unicode::IsClusterExtender(aChars[0]) ||
(mozilla::unicode::IsClusterExtenderExcludingJoiners(aChars[0]) ||
(IsBidiControl(aChars[0]) &&
IsSpaceCombiningSequenceTail(aChars + 1, aLength - 1)
)