From e50de387053eb202615731f8f2a5738b07718871 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 6 Aug 2023 10:39:56 +0300 Subject: [PATCH] apparently reddit subs can be 2 letters (like /r/de) --- files/helpers/regex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 184049d23..f2d147823 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -43,7 +43,7 @@ title_regex = re.compile("[^\w ]", flags=re.A) controversial_regex = re.compile('["> ](https:\/\/old\.reddit\.com/r/\w{3,20}\/comments\/[\w\-.#&/=\?@%+]{5,250})["< ]', flags=re.A) spoiler_regex = re.compile('\|\|(.+?)\|\|' + NOT_IN_CODE_OR_LINKS, flags=re.A) -reddit_regex = re.compile('(?|")~{1,2}([^~]+)~{1,2}' + NOT_IN_CODE_OR_LINKS, flags=re.A)