From fa222922b91b94e6e1ab5bad154ab5d962eaeabc Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 16 Aug 2023 00:18:48 +0300 Subject: [PATCH] fix reddit-app-generated links --- 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 6c71487b3..da84803a2 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -138,7 +138,7 @@ allowed_domain_regex = re.compile("[a-z0-9\-.]+", flags=re.I|re.A) reddit_to_vreddit_regex = re.compile('(^|>|")https:\/\/old.reddit.com\/(r|u)\/', flags=re.A) twitter_to_nitter_regex = re.compile('(^|>|")https:\/\/twitter.com\/(?!i\/)', flags=re.A) -reddit_domain_regex = re.compile("(^|\s|\()https?:\/\/(reddit\.com|(?:(?:[A-z]{2})(?:-[A-z]{2})" "?|beta|i|m|pay|ssl|www|new|alpha)\.reddit\.com|libredd\.it|reddit\.lol)\/(r|u|comments)\/", flags=re.A) +reddit_domain_regex = re.compile("(^|\s|\()https?:\/\/(reddit\.com|(?:(?:[A-z]{2})(?:-[A-z]{2})" "?|beta|i|m|pay|ssl|www|new|alpha)\.reddit\.com|libredd\.it|reddit\.lol)\/(u|(r\/(\w|-){2,25}\/)?comments)\/", flags=re.A) color_regex = re.compile("[a-f0-9]{6}", flags=re.A)