diff options
author | Smitty <me@iter.ca> | 2024-02-29 01:02:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-29 06:02:41 +0000 |
commit | ffc9730a484d3b30c9c1b8ef3366b715e6808bcd (patch) | |
tree | 0b18e2776c248a05fe7d871702f92caf2e0b6845 /python/tidy/tidy.py | |
parent | 51b331385488f42b5b3263e6e4e7f4af39e1ecf1 (diff) | |
download | servo-ffc9730a484d3b30c9c1b8ef3366b715e6808bcd.tar.gz servo-ffc9730a484d3b30c9c1b8ef3366b715e6808bcd.zip |
tidy: Fix WHATWG replacement links (#31449)
Diffstat (limited to 'python/tidy/tidy.py')
-rw-r--r-- | python/tidy/tidy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/tidy/tidy.py b/python/tidy/tidy.py index 584291c5ccf..1833db51187 100644 --- a/python/tidy/tidy.py +++ b/python/tidy/tidy.py @@ -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)) |