Make some attr values case-insensitive in selectors

https://bugzilla.mozilla.org/show_bug.cgi?id=1363531
This commit is contained in:
Simon Sapin 2017-05-18 00:27:49 +02:00
parent c5e37f3d2c
commit 94b4a32c18
10 changed files with 167 additions and 30 deletions

View file

@ -447,6 +447,7 @@ def check_rust(file_name, lines):
prev_use = None
prev_open_brace = False
multi_line_string = False
current_indent = 0
prev_crate = {}
prev_mod = {}
@ -464,6 +465,15 @@ def check_rust(file_name, lines):
prev_indent = indent
indent = len(original_line) - len(line)
# Hack for components/selectors/build.rs
if multi_line_string:
if line.startswith('"#'):
multi_line_string = False
else:
continue
if line.endswith('r#"'):
multi_line_string = True
is_attribute = re.search(r"#\[.*\]", line)
is_comment = re.search(r"^//|^/\*|^\*", line)