New markdown method - hide_link (can be used to add images to text posts as preview)

This commit is contained in:
Suren Khorenyan 2018-04-01 16:17:09 +03:00
parent 014be7bca6
commit edf6fda11c

View file

@ -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>'