fix: parse inside block
This commit is contained in:
parent
d3cff325eb
commit
44fb897a41
1 changed files with 22 additions and 10 deletions
|
|
@ -1328,16 +1328,28 @@ pub const Parser = struct {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tag = try self.parseTag(allocator);
|
// var tag = try self.parseTag(allocator);
|
||||||
if (tag != null) {
|
// if (tag != null) {
|
||||||
if (tag.?.tag.?.kind == .comment) {
|
// if (tag.?.tag.?.kind == .comment) {
|
||||||
try self.parseComment();
|
// std.debug.print("vou parsear comentário\n", .{});
|
||||||
continue;
|
// try self.parseComment();
|
||||||
} else {
|
// continue;
|
||||||
if (try self.parseTagContent(allocator, tag.?)) |tn| {
|
// } else {
|
||||||
tag.?.tag.?.body = tn;
|
// if (try self.parseTagContent(allocator, tag.?)) |tn| {
|
||||||
try body.append(allocator, tag.?);
|
// 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;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue