fix: parse tags inside forblock
This commit is contained in:
parent
ea30958701
commit
fadae5d39c
1 changed files with 14 additions and 2 deletions
|
|
@ -1763,6 +1763,18 @@ pub const Parser = struct {
|
||||||
continue;
|
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);
|
try current_body.append(allocator, tag_node);
|
||||||
} else {
|
} else {
|
||||||
self.advance(1);
|
self.advance(1);
|
||||||
|
|
@ -2151,7 +2163,7 @@ pub const Parser = struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
const value = std.mem.trim(u8, args[start..i], " \t\r\n\"'");
|
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);
|
try values.append(allocator, value);
|
||||||
}
|
}
|
||||||
return TagNodeBody{
|
return TagNodeBody{
|
||||||
|
|
@ -2293,7 +2305,7 @@ pub const Parser = struct {
|
||||||
try self.parseComment();
|
try self.parseComment();
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
std.log.debug("Tag: {s}", .{tag.?.tag.?.raw});
|
// std.log.debug("Tag: {s}", .{tag.?.tag.?.raw});
|
||||||
if (try self.parseTagContent(allocator, tag.?)) |tn| {
|
if (try self.parseTagContent(allocator, tag.?)) |tn| {
|
||||||
tag.?.tag.?.body = tn;
|
tag.?.tag.?.body = tn;
|
||||||
try list.append(allocator, tag.?);
|
try list.append(allocator, tag.?);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue