css: use parseSelectorGroup() with parse()

This commit is contained in:
Pierre Tachoire
2024-03-18 21:21:44 +01:00
parent 5e8ec4532d
commit a2e747002b

View File

@@ -57,7 +57,7 @@ pub const Parser = struct {
opts: ParseOptions,
pub fn parse(p: *Parser, alloc: std.mem.Allocator) ParseError!Selector {
return p.parseSelector(alloc);
return p.parseSelectorGroup(alloc);
}
// skipWhitespace consumes whitespace characters and comments.
@@ -583,6 +583,8 @@ pub const Parser = struct {
try buf.append(ss);
}
if (buf.items.len == 1) return buf.items[0];
return .{ .group = try buf.toOwnedSlice() };
}