diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-05-18 00:27:49 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-05-18 17:13:15 +0200 |
commit | 94b4a32c1894e6e95776c350b4cbc3645837af64 (patch) | |
tree | abdba2be3491f9303741f2d061f646a5d0b3c7e1 /python/tidy/servo_tidy | |
parent | c5e37f3d2cdcf8b53d4b5f5876d2091e5676efed (diff) | |
download | servo-94b4a32c1894e6e95776c350b4cbc3645837af64.tar.gz servo-94b4a32c1894e6e95776c350b4cbc3645837af64.zip |
Make some attr values case-insensitive in selectors
https://bugzilla.mozilla.org/show_bug.cgi?id=1363531
Diffstat (limited to 'python/tidy/servo_tidy')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index b8229e67d96..51e7e69f8d4 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -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) |