From 5e48e1de8ba3caf684709fa519f8b94970d4de44 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Mon, 28 Oct 2024 12:14:03 +0100 Subject: fix template handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit we were parsing refs across multiple lines as an error, but should just silently ignore that, since it might just be the contents of a style tag Signed-off-by: Robert Günzler --- src/main.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.zig b/src/main.zig index f2c7b1b..148c354 100644 --- a/src/main.zig +++ b/src/main.zig @@ -129,8 +129,9 @@ fn inject(allocator: std.mem.Allocator, f: std.fs.File, srcpath: []const u8) Bui try out_stream.writeAll(chunk[end + 1 ..]); try buf_writer.flush(); } else { - std.log.err("Templating error in {s}", .{srcpath}); - std.os.linux.exit(1); + // NOTE: we need to print the opening brace. we did not find a + // closing brace on the same line, so this isn't a ref + try out_stream.writeAll("{"); } } else { try out_stream.writeAll(chunk); -- cgit 1.4.1