mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
use tokenizeAny instead of tokenizeScalar in Selector
This commit is contained in:
@@ -468,7 +468,7 @@ fn matchesAttribute(el: *Node.Element, attr: Selector.Attribute) bool {
|
|||||||
},
|
},
|
||||||
.word => |expected| {
|
.word => |expected| {
|
||||||
// Space-separated word match (like class names)
|
// Space-separated word match (like class names)
|
||||||
var it = std.mem.tokenizeScalar(u8, value, ' ');
|
var it = std.mem.tokenizeAny(u8, value, &std.ascii.whitespace);
|
||||||
while (it.next()) |word| {
|
while (it.next()) |word| {
|
||||||
const same = if (attr.case_insensitive)
|
const same = if (attr.case_insensitive)
|
||||||
std.ascii.eqlIgnoreCase(word, expected)
|
std.ascii.eqlIgnoreCase(word, expected)
|
||||||
|
|||||||
Reference in New Issue
Block a user