aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy/tidy.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-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)