From 584e031530fa6b961418a7c69d42ad36ea2f6d67 Mon Sep 17 00:00:00 2001 From: CYBAI Date: Thu, 23 Jul 2020 13:05:04 +0900 Subject: [PATCH] Handle apostrophes for whatwg URL tidy check --- python/tidy/servo_tidy/tidy.py | 4 ++-- 1 file 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))