aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-07-27 22:14:14 -0400
committerRapptz <[email protected]>2019-07-27 22:14:14 -0400
commit8e594ac1ad813c0d1122a216dbe8859279238964 (patch)
treeeb3228b467f8dded3de12366250ff3ba21c0366d
parentDocument that the cache retrieval functions require an int ID. (diff)
downloaddiscord.py-8e594ac1ad813c0d1122a216dbe8859279238964.tar.xz
discord.py-8e594ac1ad813c0d1122a216dbe8859279238964.zip
Escape quote markdown in utils.escape_markdown
-rw-r--r--discord/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/utils.py b/discord/utils.py
index 490ab767..d53d751f 100644
--- a/discord/utils.py
+++ b/discord/utils.py
@@ -441,7 +441,7 @@ def escape_markdown(text, *, as_needed=False, ignore_links=True):
return is_url
return '\\' + groupdict['markdown']
- regex = r'(?P<markdown>[_\\~|\*`])'
+ regex = r'(?P<markdown>[_\\~|\*`]|>(?:>>)?\s)'
if ignore_links:
regex = '(?:%s|%s)' % (url_regex, regex)
return re.sub(regex, replacement, text)