diff --git a/data/web/corefork.telegram.org/api/entities.html b/data/web/corefork.telegram.org/api/entities.html index c974cada6d..3979c59128 100644 --- a/data/web/corefork.telegram.org/api/entities.html +++ b/data/web/corefork.telegram.org/api/entities.html @@ -81,7 +81,7 @@ UTF-8 is used by the MTProto and Bot API when transmitting and receiving fields
length := 0
for byte in text {
if (byte & 0xc0) != 0x80 {
- length += 1 + (byte >= 0xf0)
+ length += (byte >= 0xf0 ? 2 : 1)
}
}
Note: the length of an entity must not include the length of trailing newlines or whitespaces, rtrim
entities before computing their length: however, the next offset must include the length of newlines or whitespaces that precede it.