From: Vladimír Vondruš Date: Sun, 17 Jun 2018 09:50:01 +0000 (+0200) Subject: css: properly handle variable declarations with comments in postprocess.py. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=711fc77569faceb15fedb644124e3549fcfa2bc1;p=blog.git css: properly handle variable declarations with comments in postprocess.py. --- diff --git a/css/postprocess.py b/css/postprocess.py index 78d822bf..f18c27ef 100755 --- a/css/postprocess.py +++ b/css/postprocess.py @@ -35,7 +35,7 @@ closing_brace_rx = re.compile("^\\s*}\\s*$") comment_rx = re.compile("^\\s*(/\\*.*\\*/)?\\s*$") comment_start_rx = re.compile("^\\s*(/\\*.*)\\s*$") comment_end_rx = re.compile("^\\s*(.*\\*/)\\s*$") -variable_declaration_rx = re.compile("^\\s*(?P--[a-z-]+)\\s*:\\s*(?P[^;]+)\\s*;\\s*$") +variable_declaration_rx = re.compile("^\\s*(?P--[a-z-]+)\\s*:\\s*(?P[^;]+)\\s*;\\s*(/\\*.*\\*/)?\\s*$") variable_use_rx = re.compile("^(?P.+)var\\((?P--[a-z-]+)\\)(?P.+)$") def postprocess(files, process_imports, out_file):