diff options
| author | Robert Günzler <r@gnzler.io> | 2024-10-28 12:14:03 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2024-11-02 14:33:13 +0100 |
| commit | 5e48e1de8ba3caf684709fa519f8b94970d4de44 (patch) | |
| tree | 05fedb0eb2de9ce6f37ea1d21331f4804480d87e /src/main.zig | |
| parent | 3300021663ce97a5fd368438fa9dac5943aa6d25 (diff) | |
| download | site-5e48e1de8ba3caf684709fa519f8b94970d4de44.tar.gz | |
fix template handling
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 <r@gnzler.io>
Diffstat (limited to '')
| -rw-r--r-- | src/main.zig | 5 |
1 files changed, 3 insertions, 2 deletions
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); |