From 948972945a59c8b0ecf46a6b38d3950eb5b65eae Mon Sep 17 00:00:00 2001 From: official-techsupport <98240022+official-techsupport@users.noreply.github.com> Date: Wed, 31 Aug 2022 18:08:27 +0300 Subject: [PATCH] fix showmore regex (again) (#346) --- files/helpers/regex.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 4a59e49716..30c65408f7 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -92,7 +92,8 @@ reddit_domain_regex = re.compile("(^|\s|\()https?:\/\/(reddit\.com|new\.reddit.c color_regex = re.compile("[a-z0-9]{6}", flags=re.A) # lazy match on the {}?, only match if there is trailing stuff -showmore_regex = re.compile(r"^(.{3000,}?

)(\s*\S.*)", flags=re.A|re.DOTALL) +# don't match between nested

etc, this can break but works for Snappy +showmore_regex = re.compile(r"^(.{3000,}?

)(\s*<[^/].*)", flags=re.A|re.DOTALL) search_token_regex = re.compile('"([^"]*)"|(\S+)', flags=re.A)