Fix backslash (\) issue in escape_markdown
This commit is contained in:
parent
0f52ca688f
commit
1946393c36
|
@ -61,8 +61,8 @@ def escape_markdown(content: str) -> str:
|
|||
:rtype: :obj:`str`
|
||||
"""
|
||||
|
||||
parse = re.sub(r"([_*\[\]()~`>\#\+\-=|\.!\{\}])", r"\\\1", content)
|
||||
reparse = re.sub(r"\\\\([_*\[\]()~`>\#\+\-=|\.!\{\}])", r"\1", parse)
|
||||
parse = re.sub(r"([_*\[\]()~`>\#\+\-=|\.!\{\}\\])", r"\\\1", content)
|
||||
reparse = re.sub(r"\\\\([_*\[\]()~`>\#\+\-=|\.!\{\}\\])", r"\1", parse)
|
||||
return reparse
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue