Skip to content

Commit

Permalink
Fix markdown's URL regex not acceping newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonami committed Feb 27, 2018
1 parent d5832e4 commit 229cd78
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions telethon/extensions/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
'```': MessageEntityPre
}

# Regex used to match r'\[(.+?)\]\((.+?)\)' (for URLs.
DEFAULT_URL_RE = re.compile(r'\[(.+?)\]\((.+?)\)')

# Reverse operation for DEFAULT_URL_RE. {0} for text, {1} for URL.
DEFAULT_URL_RE = re.compile(r'\[([^\]]+)\]\((.+?)\)')
DEFAULT_URL_FORMAT = '[{0}]({1})'


Expand Down

0 comments on commit 229cd78

Please sign in to comment.