From 33e908de422508d28be66cd8bb16a698ce9b54aa Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 22 Mar 2018 19:01:50 +0100 Subject: [PATCH] Fix markdown regex not supporting [] inside URLs --- telethon/extensions/markdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/extensions/markdown.py b/telethon/extensions/markdown.py index a5dde5c6..680aabda 100644 --- a/telethon/extensions/markdown.py +++ b/telethon/extensions/markdown.py @@ -21,7 +21,7 @@ DEFAULT_DELIMITERS = { '```': MessageEntityPre } -DEFAULT_URL_RE = re.compile(r'\[([^\]]+)\]\((.+?)\)') +DEFAULT_URL_RE = re.compile(r'\[([\S\s]+?)\]\((.+?)\)') DEFAULT_URL_FORMAT = '[{0}]({1})'