mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-13 18:11:06 +03:00
Replace offset with match.start() to allow custom regex
This commit is contained in:
parent
a1448f3da8
commit
eabaa3854a
|
@ -81,7 +81,7 @@ def parse(message, delimiters=None, url_re=None):
|
||||||
))
|
))
|
||||||
|
|
||||||
result.append(MessageEntityTextUrl(
|
result.append(MessageEntityTextUrl(
|
||||||
offset=i, length=len(url_match.group(1)),
|
offset=url_match.start(), length=len(url_match.group(1)),
|
||||||
url=_del_surrogate(url_match.group(2))
|
url=_del_surrogate(url_match.group(2))
|
||||||
))
|
))
|
||||||
i += len(url_match.group(1))
|
i += len(url_match.group(1))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user