mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Added ability to hide a link in text
This commit is contained in:
parent
0f44fd3c40
commit
5e3fd17436
@ -199,3 +199,13 @@ def hpre(content: str, escape: bool=True, language: str="") -> str:
|
||||
:param escape: True if you need to escape special characters.
|
||||
"""
|
||||
return '<pre><code class="{}">{}</code></pre>'.format(language, escape_html(content) if escape else content)
|
||||
|
||||
|
||||
def hide_link(url: str) -> str:
|
||||
"""
|
||||
Hide url of an image.
|
||||
|
||||
:param url:
|
||||
:return: str
|
||||
"""
|
||||
return f'<a href="{url}">⁠</a>'
|
Loading…
Reference in New Issue
Block a user