mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Fix markdown URL parsing using character index instead offset
This commit is contained in:
parent
0a14aa1bc6
commit
82cac4836c
|
@ -134,7 +134,7 @@ def parse(message, delimiters=None, url_re=None):
|
|||
emoji_len = sum(emojiness(c) for c in url_match.group(1))
|
||||
result.append((
|
||||
offset,
|
||||
i + emoji_len,
|
||||
offset + emoji_len,
|
||||
(Mode.URL, url_match.group(2))
|
||||
))
|
||||
i += len(url_match.group(1))
|
||||
|
|
Loading…
Reference in New Issue
Block a user