Gotta use raw text for regex obviously

cogguide_develop
bobloy 4 years ago
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…
Cancel
Save