diff options
author | CYBAI <cyb.ai.815@gmail.com> | 2020-07-23 13:05:04 +0900 |
---|---|---|
committer | CYBAI <cyb.ai.815@gmail.com> | 2020-07-23 13:05:04 +0900 |
commit | 584e031530fa6b961418a7c69d42ad36ea2f6d67 (patch) | |
tree | 2798286b062f0ad2582bad33b776a203ee6e357c /python/tidy | |
parent | 6a9aac3e654d4498c8c2605ebe8a24b609770e21 (diff) | |
download | servo-584e031530fa6b961418a7c69d42ad36ea2f6d67.tar.gz servo-584e031530fa6b961418a7c69d42ad36ea2f6d67.zip |
Handle apostrophes for whatwg URL tidy check
Diffstat (limited to 'python/tidy')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 4bcc4f55ca1..163fd99e867 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -281,14 +281,14 @@ def is_unsplittable(file_name, line): def check_whatwg_specific_url(idx, line): - match = re.search(br"https://html\.spec\.whatwg\.org/multipage/[\w-]+\.html#([\w\:-]+)", line) + match = re.search(br"https://html\.spec\.whatwg\.org/multipage/[\w-]+\.html#([\w\'\:-]+)", line) if match is not None: preferred_link = "https://html.spec.whatwg.org/multipage/#{}".format(match.group(1)) yield (idx + 1, "link to WHATWG may break in the future, use this format instead: {}".format(preferred_link)) def check_whatwg_single_page_url(idx, line): - match = re.search(br"https://html\.spec\.whatwg\.org/#([\w\:-]+)", line) + match = re.search(br"https://html\.spec\.whatwg\.org/#([\w\'\:-]+)", line) if match is not None: preferred_link = "https://html.spec.whatwg.org/multipage/#{}".format(match.group(1)) yield (idx + 1, "links to WHATWG single-page url, change to multi page: {}".format(preferred_link)) |