aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-05-18 18:45:20 -0500
committerGitHub <noreply@github.com>2017-05-18 18:45:20 -0500
commit640b16634f2828bad46ab6d78e785dfc2025ab46 (patch)
tree39ceb66e43604f1dcf2846b3d56b0726b4750451 /python
parent0b3fd8de767c6ad6ea2fd983c396f5c0a20becfc (diff)
parentb359e3fcb40c03b1cb801caa7943eb72881509cf (diff)
downloadservo-640b16634f2828bad46ab6d78e785dfc2025ab46.tar.gz
servo-640b16634f2828bad46ab6d78e785dfc2025ab46.zip
Auto merge of #16915 - servo:attr-selectors, r=nox,emilio
Shrink selectors::Component, implement attr selector (in)case-sensitivity * https://bugzilla.mozilla.org/show_bug.cgi?id=1364148 * https://bugzilla.mozilla.org/show_bug.cgi?id=1364162 * https://bugzilla.mozilla.org/show_bug.cgi?id=1363531 * Fixes #3322 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16915) <!-- Reviewable:end -->
Diffstat (limited to 'python')
-rw-r--r--python/tidy/servo_tidy/tidy.py10
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)