aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy
diff options
context:
space:
mode:
authorCYBAI <cyb.ai.815@gmail.com>2020-07-23 13:05:04 +0900
committerCYBAI <cyb.ai.815@gmail.com>2020-07-23 13:05:04 +0900
commit584e031530fa6b961418a7c69d42ad36ea2f6d67 (patch)
tree2798286b062f0ad2582bad33b776a203ee6e357c /python/tidy
parent6a9aac3e654d4498c8c2605ebe8a24b609770e21 (diff)
downloadservo-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.py4
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))