mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
tidy: Fix WHATWG replacement links (#31449)
This commit is contained in:
parent
51b3313854
commit
ffc9730a48
2 changed files with 4 additions and 4 deletions
|
@ -271,14 +271,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)
|
||||
if match is not None:
|
||||
preferred_link = "https://html.spec.whatwg.org/multipage/#{}".format(match.group(1))
|
||||
preferred_link = "https://html.spec.whatwg.org/multipage/#{}".format(match.group(1).decode("utf-8"))
|
||||
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)
|
||||
if match is not None:
|
||||
preferred_link = "https://html.spec.whatwg.org/multipage/#{}".format(match.group(1))
|
||||
preferred_link = "https://html.spec.whatwg.org/multipage/#{}".format(match.group(1).decode("utf-8"))
|
||||
yield (idx + 1, "links to WHATWG single-page url, change to multi page: {}".format(preferred_link))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue