mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
Tests: Allow whitespace around fuzzy-matching configurations
Several WPT tests have a space after the semicolon, for example https://wpt.live/css/css-images/gradient/gradient-single-stop-001.html : ``` <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-6000"> ```
This commit is contained in:
parent
28c1dd551b
commit
9889710033
|
|
@ -79,7 +79,7 @@ ErrorOr<FuzzyMatch> parse_fuzzy_match(Optional<URL::URL const&> reference, Strin
|
|||
Optional<FuzzyRange> color_value_error;
|
||||
Optional<FuzzyRange> pixel_error_count;
|
||||
for (auto [i, config_part] : enumerate(config_parts)) {
|
||||
auto named_parts = MUST(config_part.split_limit('=', 2));
|
||||
auto named_parts = MUST(MUST(config_part.trim_ascii_whitespace()).split_limit('=', 2));
|
||||
if (named_parts.is_empty())
|
||||
return Error::from_string_view("Fuzzy configuration value cannot be empty"sv);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user