Skip to content

Commit

Permalink
New markdown method - hide_link (can be used to add images to text po…
Browse files Browse the repository at this point in the history
…sts as preview)
  • Loading branch information
mahenzon committed Apr 1, 2018
1 parent 014be7b commit edf6fda
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions aiogram/utils/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,14 @@ def escape_md(*content, sep=' '):
:return:
"""
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}">&#8203;</a>'

0 comments on commit edf6fda

Please sign in to comment.