Make markdown URL regex less greedy

Fixes multiple URLs in a single message.
This commit is contained in:
Nick80835 2025-02-05 05:35:10 -05:00 committed by Lonami
parent 551c24f3e4
commit 141b620437

View File

@ -22,7 +22,7 @@ DEFAULT_DELIMITERS = {
'```': MessageEntityPre
}
DEFAULT_URL_RE = re.compile(r'\[([\s\S]+)\]\((.+)\)')
DEFAULT_URL_RE = re.compile(r'\[([\s\S]+?)\]\((.+?)\)')
DEFAULT_URL_FORMAT = '[{0}]({1})'