dom: no need to allocate mem for case insensitive equality

thanks to
[std.ascii.eqlIgnoreCase](https://ziglang.org/documentation/master/std/#A;std:ascii.eqlIgnoreCase)
This commit is contained in:
Pierre Tachoire
2023-11-17 17:11:39 +01:00
parent 9b94a4ec49
commit e9edb8bab4
2 changed files with 9 additions and 12 deletions

View File

@@ -50,9 +50,9 @@ pub const Document = struct {
// the spec changed to return an HTMLCollection instead.
// That's why we reimplemented getElementsByTagName by using an
// HTMLCollection in zig here.
pub fn _getElementsByTagName(self: *parser.Document, allocator: std.mem.Allocator, tag_name: []const u8) !collection.HTMLCollection {
pub fn _getElementsByTagName(self: *parser.Document, tag_name: []const u8) !collection.HTMLCollection {
const root = parser.documentGetDocumentElement(self);
return collection.HTMLCollectionByTagName(allocator, parser.elementToNode(root), tag_name);
return collection.HTMLCollectionByTagName(parser.elementToNode(root), tag_name);
}
};