From 1f941db1682dbb2de1dc0e00457b275683cd10f3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 26 Aug 2021 18:33:20 +0200 Subject: [PATCH] fdfd --- files/helpers/markdown.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/markdown.py b/files/helpers/markdown.py index 471265e6e..e4663b8e3 100644 --- a/files/helpers/markdown.py +++ b/files/helpers/markdown.py @@ -17,7 +17,7 @@ enter_re=re.compile("(\n\r?\w+){3,}") class UserMention(SpanToken): - pattern = re.compile("(^|\s|\n)@(\w{1,25})") + pattern = re.compile("(^|\s|\n)@((\w|-){1,25})") parse_inner = False def __init__(self, match_obj): @@ -34,7 +34,7 @@ class SubMention(SpanToken): class RedditorMention(SpanToken): - pattern = re.compile("(^|\s|\n)u/(\w{3,25})") + pattern = re.compile("(^|\s|\n)u/((\w|-){3,25})") parse_inner = False def __init__(self, match_obj): @@ -52,7 +52,7 @@ class SubMention2(SpanToken): class RedditorMention2(SpanToken): - pattern = re.compile("(^|\s|\n)/u/(\w{3,25})") + pattern = re.compile("(^|\s|\n)/u/((\w|-){3,25})") parse_inner = False def __init__(self, match_obj):