mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
New markdown method - hide_link (can be used to add images to text posts as preview)
This commit is contained in:
parent
014be7bca6
commit
edf6fda11c
1 changed files with 11 additions and 0 deletions
|
|
@ -185,3 +185,14 @@ def escape_md(*content, sep=' '):
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
return _escape(_join(*content, sep=sep))
|
return _escape(_join(*content, sep=sep))
|
||||||
|
|
||||||
|
|
||||||
|
def hide_link(url):
|
||||||
|
"""
|
||||||
|
Hide URL (HTML only)
|
||||||
|
Can be used for adding an image to a text message
|
||||||
|
|
||||||
|
:param url:
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
return f'<a href="{url}">​</a>'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue