authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-02-01 06:26:17 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-02-01 06:26:17 -08:00
log49b2881bff276dbd136ace113c4f6878638dfc4b
treee312c133f0b338d47001eec3a4571b3c63980b76
parentd387b9f94b384254a1979e74f42554287a7545a2

add .function to list of text values


1 files changed, 4 insertions(+), 1 deletions(-)

src/lib.zig+4-1
...@@ -29,7 +29,10 @@ fn do(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, comptime va...@@ -29,7 +29,10 @@ fn do(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, comptime va
29 switch (comptime value) {29 switch (comptime value) {
30 .element => |v| {30 .element => |v| {
31 const hastext = for (v.children) |x| {31 const hastext = for (v.children) |x| {
32 if (x == .string or x == .replacement) break true;32 switch (x) {
33 .string, .replacement, .function => break true,
34 .element, .attr, .block, .body => {},
35 }
33 } else false;36 } else false;
3437
35 if (flag1) for (range(indent)) |_| try writer.writeAll(" ");38 if (flag1) for (range(indent)) |_| try writer.writeAll(" ");