mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-03 05:04:33 +03:00
Unconditionally match text and link text in markdown
Fixes cases where there's a nested [] in the text by matching until "](" is reached. This doesn't match newlines in URLs because that makes no sense.
This commit is contained in:
parent
a2926b548f
commit
38d024312e
|
@ -22,7 +22,7 @@ DEFAULT_DELIMITERS = {
|
|||
'```': MessageEntityPre
|
||||
}
|
||||
|
||||
DEFAULT_URL_RE = re.compile(r'\[([^\]]+)\]\(([^)]+)\)')
|
||||
DEFAULT_URL_RE = re.compile(r'\[([\s\S]+)\]\((.+)\)')
|
||||
DEFAULT_URL_FORMAT = '[{0}]({1})'
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user