From fadae5d39cb689db4aec76fc9f565419a696d1be Mon Sep 17 00:00:00 2001 From: "Lucas F." Date: Thu, 22 Jan 2026 10:03:03 -0300 Subject: [PATCH] fix: parse tags inside forblock --- src/parser.zig | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/parser.zig b/src/parser.zig index c5aef01..75dd3de 100644 --- a/src/parser.zig +++ b/src/parser.zig @@ -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.?);