Fix caption being "None" when passing None (#879)

This commit is contained in:
Shrimadhav U K 2022-01-29 15:43:09 +05:30 committed by GitHub
parent 7d444381c7
commit 4af9e30cfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ class Parser:
self.markdown = Markdown(client) self.markdown = Markdown(client)
async def parse(self, text: str, mode: Optional[str] = object): async def parse(self, text: str, mode: Optional[str] = object):
text = str(text).strip() text = str(text if text else "").strip()
if mode == object: if mode == object:
if self.client: if self.client: