Skip to content

Commit eddff47

Browse files
authored
Add missing async/await
1 parent 8700e3a commit eddff47

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pyrogram/client/parser/parser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, client: Union["pyrogram.BaseClient", None]):
3030
self.html = HTML(client)
3131
self.markdown = Markdown(client)
3232

33-
def parse(self, text: str, mode: Union[str, None] = object):
33+
async def parse(self, text: str, mode: Union[str, None] = object):
3434
text = str(text).strip()
3535

3636
if mode == object:
@@ -48,13 +48,13 @@ def parse(self, text: str, mode: Union[str, None] = object):
4848
mode = mode.lower()
4949

5050
if mode == "combined":
51-
return self.markdown.parse(text)
51+
return await self.markdown.parse(text)
5252

5353
if mode in ["markdown", "md"]:
54-
return self.markdown.parse(text, True)
54+
return await self.markdown.parse(text, True)
5555

5656
if mode == "html":
57-
return self.html.parse(text)
57+
return await self.html.parse(text)
5858

5959
raise ValueError('parse_mode must be one of {} or None. Not "{}"'.format(
6060
", ".join('"{}"'.format(m) for m in pyrogram.Client.PARSE_MODES[:-1]),

0 commit comments

Comments
 (0)