Fix HTML entity parsing failing when needing surrogates

This commit is contained in:
Lonami Exo
2018-02-15 11:52:46 +01:00
parent 178643d3a1
commit 75d99fbb53
2 changed files with 22 additions and 4 deletions

View File

@@ -152,6 +152,9 @@ def unparse(text, entities, delimiters=None, url_fmt=None):
:param entities: the MessageEntity's applied to the text.
:return: a markdown-like text representing the combination of both inputs.
"""
if not entities:
return text
if not delimiters:
if delimiters is not None:
return text