From 641a23c5c1d35404a0ef7de9c39fc742bb574910 Mon Sep 17 00:00:00 2001 From: Glenn Skrzypczak Date: Fri, 14 Mar 2025 14:31:16 +0100 Subject: [PATCH] Tests: Import URLs surrounded by single quotes This updates the regex for CSS URLs in the WPT import script to correctly match URLs surrounded by single quotes. --- Meta/import-wpt-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meta/import-wpt-test.py b/Meta/import-wpt-test.py index 6e0c53f8c90..e69a6a40a0c 100755 --- a/Meta/import-wpt-test.py +++ b/Meta/import-wpt-test.py @@ -52,7 +52,7 @@ class LinkedResourceFinder(HTMLParser): def __init__(self): super().__init__() self._tag_stack_ = [] - self._match_css_url_ = re.compile(r"url\(\"?(?P[^\")]+)\"?\)") + self._match_css_url_ = re.compile(r"url\(['\"]?(?P[^'\")]+)['\"]?\)") self._match_css_import_string_ = re.compile(r"@import\s+\"(?P[^\")]+)\"") self._resources = []