mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
parent
cb21159589
commit
a238c6178a
@ -438,7 +438,7 @@ def escape_markdown(text, *, as_needed=False, ignore_links=True):
|
||||
"""
|
||||
|
||||
if not as_needed:
|
||||
url_regex = r'(?P<url>(?:https?|steam)://(?:-\.)?(?:[^\s/?\.#-]+\.?)+(?:/[^\s]*)?)'
|
||||
url_regex = r'(?P<url><[^: >]+:\/[^ >]+>|(?:https?|steam):\/\/[^\s<]+[^<.,:;\"\'\]\s])'
|
||||
def replacement(match):
|
||||
groupdict = match.groupdict()
|
||||
is_url = groupdict.get('url')
|
||||
|
Loading…
x
Reference in New Issue
Block a user