mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Update formatting.py
This commit is contained in:
parent
5b279b7ad9
commit
925f7012f1
@ -61,8 +61,8 @@ def escape_markdown(content: str) -> str:
|
||||
:rtype: :obj:`str`
|
||||
"""
|
||||
|
||||
parse = re.sub(r"([_*\[\]()~`>\#\+\-=|\.!])", r"\\\1", content)
|
||||
reparse = re.sub(r"\\\\([_*\[\]()~`>\#\+\-=|\.!])", r"\1", parse)
|
||||
parse = re.sub(r"([_*\[\]()~`>\#\+\-=|\.!\{}])", r"\\\1", content)
|
||||
reparse = re.sub(r"\\\\([_*\[\]()~`>\#\+\-=|\.!\{}])", r"\1", parse)
|
||||
return reparse
|
||||
|
||||
|
||||
@ -323,4 +323,4 @@ def hide_link(url: str) -> str:
|
||||
:return: The hidden url.
|
||||
:rtype: :obj:`str`
|
||||
"""
|
||||
return f'<a href="{url}">⁠</a>'
|
||||
return f'<a href="{url}">⁠</a>'
|
||||
|
Loading…
Reference in New Issue
Block a user