diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 5f91c930b..4f68ca1de 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -95,8 +95,8 @@ reddit_domain_regex = re.compile("(^|\s|\()https?:\/\/(reddit\.com|(?:(?:[A-z]{2 color_regex = re.compile("[a-z0-9]{6}", flags=re.A) # lazy match on the {}?, only match if there is trailing stuff -# 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) +# Specifically match Snappy's way of formatting, this might break some losers' comments. +showmore_regex = re.compile(r"^(.{3000,}?
(?:)?)(\s*.*)", flags=re.A|re.DOTALL) search_token_regex = re.compile('"([^"]*)"|(\S+)', flags=re.A) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 966ba07e1..5d2867b6d 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -386,7 +386,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys if '
' not in sanitized: sanitized = sanitized.replace('\n','') - if showmore and len(sanitized) > 5000: + if showmore and len(sanitized) > 3500: sanitized = showmore_regex.sub(r'\1\2 ', sanitized, count=1) return sanitized.strip()