diff --git a/utils/markdown.py b/utils/markdown.py index bc3511e..8cbb62a 100644 --- a/utils/markdown.py +++ b/utils/markdown.py @@ -107,6 +107,13 @@ def parse_forum_markdown(text): text = re.sub(r'\[([^\]]+)\]\(([^)]+)\)', safe_link, text) + # Auto-link bare URLs (must come after [text](url) so already-linked URLs aren't doubled) + text = re.sub( + r'(?=/])(?{m.group(0)}', + text + ) + # @mentions - highlight them text = re.sub( r'@([\w.\-]+)',