Allow zero width space in the middle of text.
This commit is contained in:
parent
34fcd4981d
commit
a48b3d3750
1 changed files with 4 additions and 3 deletions
|
|
@ -1812,8 +1812,7 @@ bool IsSpace(QChar ch) {
|
||||||
|| (ch == QChar::LineSeparator)
|
|| (ch == QChar::LineSeparator)
|
||||||
|| (ch == QChar::ObjectReplacementCharacter)
|
|| (ch == QChar::ObjectReplacementCharacter)
|
||||||
|| (ch == QChar::CarriageReturn)
|
|| (ch == QChar::CarriageReturn)
|
||||||
|| (ch == QChar::Tabulation)
|
|| (ch == QChar::Tabulation);
|
||||||
|| (ch == QChar(8203)/*Zero width space.*/);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsDiacritic(QChar ch) { // diacritic and variation selectors
|
bool IsDiacritic(QChar ch) { // diacritic and variation selectors
|
||||||
|
|
@ -1838,7 +1837,9 @@ bool IsReplacedBySpace(QChar ch) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsTrimmed(QChar ch) {
|
bool IsTrimmed(QChar ch) {
|
||||||
return (IsSpace(ch) || IsBad(ch));
|
return IsSpace(ch)
|
||||||
|
|| IsBad(ch)
|
||||||
|
|| (ch == QChar(8203)); // zero width space
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Ui::Text
|
} // namespace Ui::Text
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue