From 2e099517169a3c21aa41bc17cd582247a6e37b91 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 11 Dec 2022 20:33:44 +0200 Subject: [PATCH] fix this https://stupidpol.site/h/programming/post/129962/advent-of-code-2022-day-9/3219293?context=8#context --- 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 7b99d3e21..c4569c45e 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -40,7 +40,7 @@ controversial_regex = re.compile('["> ](https:\/\/old\.reddit\.com/r/[a-zA-Z0-9_ fishylinks_regex = re.compile("https?://\S+", flags=re.A) -spoiler_regex = re.compile('\|\|(.+)\|\|(?![^<]*<\/(code|pre|a)>)', flags=re.A) +spoiler_regex = re.compile('\|\|(.+?)\|\|(?![^<]*<\/(code|pre|a)>)', flags=re.A) reddit_regex = re.compile('(^|\s|

)\/?((r|u)\/(\w|-){3,25})(?![^<]*<\/(code|pre|a)>)', flags=re.A) sub_regex = re.compile('(^|\s|

)\/?(h\/(\w|-){3,25})(?![^<]*<\/(code|pre|a)>)', flags=re.A)