Gotta use raw text for regex obviously
This commit is contained in:
parent
bd10d8cfb1
commit
746414e4d4
@ -36,7 +36,7 @@ def markdown_link_replace(match, starts_with_text=None):
|
|||||||
def prepare_description(command: commands.Command):
|
def prepare_description(command: commands.Command):
|
||||||
description = command.description or command.help
|
description = command.description or command.help
|
||||||
description = description.replace("`", "``")
|
description = description.replace("`", "``")
|
||||||
pattern = re.compile("\[(.+)]\s?\((https?:\/\/[\w\d.\/?=#]+)\)")
|
pattern = re.compile(r"\[(.+)]\s?\((https?:\/\/[\w\d.\/?=#]+)\)")
|
||||||
description = pattern.sub(markdown_link_replace, description)
|
description = pattern.sub(markdown_link_replace, description)
|
||||||
return description
|
return description
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user