Fix caption being "None" when passing None (#879)
This commit is contained in:
parent
7d444381c7
commit
4af9e30cfd
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user