From 44fb897a415416d46d2757b195a965ce45a7ac81 Mon Sep 17 00:00:00 2001 From: "Lucas F." Date: Sat, 17 Jan 2026 20:31:45 -0300 Subject: [PATCH] fix: parse inside block --- src/parser.zig | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/src/parser.zig b/src/parser.zig index 773a31d..e587a51 100644 --- a/src/parser.zig +++ b/src/parser.zig @@ -1328,16 +1328,28 @@ pub const Parser = struct { continue; } - var tag = try self.parseTag(allocator); - if (tag != null) { - if (tag.?.tag.?.kind == .comment) { - try self.parseComment(); - continue; - } else { - if (try self.parseTagContent(allocator, tag.?)) |tn| { - tag.?.tag.?.body = tn; - try body.append(allocator, tag.?); - } + // var tag = try self.parseTag(allocator); + // if (tag != null) { + // if (tag.?.tag.?.kind == .comment) { + // std.debug.print("vou parsear comentário\n", .{}); + // try self.parseComment(); + // continue; + // } else { + // if (try self.parseTagContent(allocator, tag.?)) |tn| { + // tag.?.tag.?.body = tn; + // try body.append(allocator, tag.?); + // } + // 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; } }