diff options
Diffstat (limited to 'python/tidy/servo_tidy')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 1dcdfd17849..9208727cbb3 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -398,7 +398,8 @@ def check_toml(file_name, lines): for idx, line in enumerate(lines): if idx == 0 and "[workspace]" in line: raise StopIteration - if line.find("*") != -1: + line_without_comment, _, _ = line.partition("#") + if line_without_comment.find("*") != -1: yield (idx + 1, "found asterisk instead of minimum version number") for license_line in licenses_toml: ok_licensed |= (license_line in line) |