parent
cb21159589
commit
a238c6178a
@ -438,7 +438,7 @@ def escape_markdown(text, *, as_needed=False, ignore_links=True):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if not as_needed:
|
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):
|
def replacement(match):
|
||||||
groupdict = match.groupdict()
|
groupdict = match.groupdict()
|
||||||
is_url = groupdict.get('url')
|
is_url = groupdict.get('url')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user