From eee2b8e40dd5951d719377d586879d75f4d8d498 Mon Sep 17 00:00:00 2001 From: Marko259 Date: Sat, 14 Sep 2024 16:43:15 +0200 Subject: [PATCH] Fixed links not correctly formatted in embed --- helpers/message.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helpers/message.py b/helpers/message.py index f478ad8..60f81b4 100644 --- a/helpers/message.py +++ b/helpers/message.py @@ -83,6 +83,9 @@ def event_description(description: str) -> str: # Create markdown of the description, except img tag and trim the result. markdown = md(description, strip=['img']).strip() + # Remove or replace backslashes + markdown = markdown.replace('\\', '') # Remove backslashes + # If there's more than two newlines, replace them with two, this removes excessive newlines from last step markdown = re.sub('\n\n(\n)*', '\n\n', markdown)