From 3a2c3a9497a6606a2fc634f49eab12e6286ae450 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Mon, 6 Nov 2017 11:22:58 +0100 Subject: [PATCH] Fix URL regex for markdown was greedy (fix-up) --- 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 2451505e..9641caa0 100644 --- a/telethon/extensions/markdown.py +++ b/telethon/extensions/markdown.py @@ -31,7 +31,7 @@ DEFAULT_DELIMITERS = { # Regex used to match utf-16le encoded r'\[(.+?)\]\((.+?)\)', # reason why there's '\0' after every match-literal character. -DEFAULT_URL_RE = re.compile(b'\\[\0(.+)\\]\0\\(\0(.+?)\\)\0') +DEFAULT_URL_RE = re.compile(b'\\[\0(.+?)\\]\0\\(\0(.+?)\\)\0') def parse(message, delimiters=None, url_re=None):