From edf6fda11cb9796e82de0e1672b01c8acdebe6e7 Mon Sep 17 00:00:00 2001 From: Suren Khorenyan Date: Sun, 1 Apr 2018 16:17:09 +0300 Subject: [PATCH] New markdown method - hide_link (can be used to add images to text posts as preview) --- aiogram/utils/markdown.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/aiogram/utils/markdown.py b/aiogram/utils/markdown.py index 1e64c106..89a23d94 100644 --- a/aiogram/utils/markdown.py +++ b/aiogram/utils/markdown.py @@ -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''