forked from rDrama/rDrama
1
0
Fork 0

fix showmore regex (again) (#346)

master
official-techsupport 2022-08-31 18:08:27 +03:00 committed by GitHub
parent c537348f74
commit 948972945a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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,}?</p>)(\s*\S.*)", flags=re.A|re.DOTALL)
# don't match between nested </p></li> etc, this can break but works for Snappy
showmore_regex = re.compile(r"^(.{3000,}?</p>)(\s*<[^/].*)", flags=re.A|re.DOTALL)
search_token_regex = re.compile('"([^"]*)"|(\S+)', flags=re.A)