Escape quote markdown in utils.escape_markdown
This commit is contained in:
parent
18fe2035ef
commit
8e594ac1ad
@ -441,7 +441,7 @@ def escape_markdown(text, *, as_needed=False, ignore_links=True):
|
|||||||
return is_url
|
return is_url
|
||||||
return '\\' + groupdict['markdown']
|
return '\\' + groupdict['markdown']
|
||||||
|
|
||||||
regex = r'(?P<markdown>[_\\~|\*`])'
|
regex = r'(?P<markdown>[_\\~|\*`]|>(?:>>)?\s)'
|
||||||
if ignore_links:
|
if ignore_links:
|
||||||
regex = '(?:%s|%s)' % (url_regex, regex)
|
regex = '(?:%s|%s)' % (url_regex, regex)
|
||||||
return re.sub(regex, replacement, text)
|
return re.sub(regex, replacement, text)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user