Fix unparsing of message.text (#4301)

Co-authored-by: Disk6969 <disk6969@users.noreply.github.com>
This commit is contained in:
Prashant Sengar 2024-01-20 15:12:13 +05:30 committed by GitHub
parent 6187ff7dcb
commit 63d9b267f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,7 @@ def within_surrogate(text, index, *, length=None):
return ( return (
1 < index < len(text) and # in bounds 1 < index < len(text) and # in bounds
'\ud800' <= text[index - 1] <= '\udfff' and # previous is '\ud800' <= text[index - 1] <= '\udbff' and # previous is
'\ud800' <= text[index] <= '\udfff' # current is '\ud800' <= text[index] <= '\udfff' # current is
) )