fix: parse tags inside forblock

This commit is contained in:
Lucas F. 2026-01-22 10:03:03 -03:00
parent ea30958701
commit fadae5d39c

View file

@ -1763,6 +1763,18 @@ pub const Parser = struct {
continue;
}
var tag: Node = tag_node;
if (tag_node.tag.?.kind == .comment) {
try self.parseComment();
continue;
} else {
if (try self.parseTagContent(allocator, tag_node)) |tn| {
tag.tag.?.body = tn;
try body.append(allocator, tag);
continue;
}
}
try current_body.append(allocator, tag_node);
} else {
self.advance(1);
@ -2151,7 +2163,7 @@ pub const Parser = struct {
}
const value = std.mem.trim(u8, args[start..i], " \t\r\n\"'");
std.debug.print("value: {s}\n", .{value});
// std.debug.print("value: {s}\n", .{value});
try values.append(allocator, value);
}
return TagNodeBody{
@ -2293,7 +2305,7 @@ pub const Parser = struct {
try self.parseComment();
continue;
} else {
std.log.debug("Tag: {s}", .{tag.?.tag.?.raw});
// std.log.debug("Tag: {s}", .{tag.?.tag.?.raw});
if (try self.parseTagContent(allocator, tag.?)) |tn| {
tag.?.tag.?.body = tn;
try list.append(allocator, tag.?);