From 70029d395507ec5e0e0d6a27c9301f59545550b8 Mon Sep 17 00:00:00 2001 From: Ice Lam Date: Mon, 7 Apr 2025 10:50:15 +0800 Subject: [PATCH] fix(markdown): disable auto links when converting to markdown This fixes issues which causes extra < and > wrapped around hyperlink with contents matches its href. --- app/utils/markdown.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/utils/markdown.py b/app/utils/markdown.py index 92d3bcf..aa92371 100644 --- a/app/utils/markdown.py +++ b/app/utils/markdown.py @@ -63,6 +63,7 @@ def generate(html, **options): result = TelegramMarkdownConverter( **options, + autolinks=False, convert=['br', 'p', 'img', 'code', 'pre', 'ul', 'ol', 'li', 'a', 'sup', 'sub', 'style'], bullets='•••' ).convert(html).strip()