Merge shit idk

pull/207/head
transbitch 2023-09-10 14:26:09 -04:00
parent 94f7c080b5
commit 67e531c4e4
1 changed files with 9 additions and 1 deletions

View File

@ -118,7 +118,15 @@ twitch_regex = re.compile('(https:\/\/)?(www\.)?twitch.tv\/(.*)', flags=re.I|re.
link_fix_regex = re.compile("(\[.*?\]\()(?!http|\/)(.*?\))" + NOT_IN_CODE_OR_LINKS, flags=re.A)
css_url_regex = re.compile('url\([\'"]?((.|\n)*?)[",);}$]', flags=re.I|re.A) # AEVANN, DO NOT TOUCH THIS, IT WENT THROUGH A MILLION ITERATIONS, IT'S PERFECT NOW
css_url_regex = re.compile('url\([\'"]?((.|\n)*?)[",);}$]', flags=re.I|re.A) # AEVANN, DO NOT TOUCH THIS, IT WENT THROUGH A MILLION ITERATIONS, IT'S PERFECT NOW <-- you probably dont actually need this anymore lol (CSP covers it)
css_style_attr_regex = re.compile('\s*([\w-]+?)\s*:((".*?"|\'.*?\'|\(.*?\)|{.*?}|\[.*?]|[^;])*);?', flags=re.I|re.A)
"""
CSS style attribute regex explanation:
Each match is one declaration. (Example: "color: red;")
Capture groups:
1. The property name (Example: "color")
2. The value, excluding the trailing ";", but including whitespace (Example: " red")
"""
linefeeds_regex = re.compile("([^\n])\n([^\n])", flags=re.A)