about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2024-10-28 12:14:03 +0100
committerRobert Günzler <r@gnzler.io>2024-11-02 14:33:13 +0100
commit5e48e1de8ba3caf684709fa519f8b94970d4de44 (patch)
tree05fedb0eb2de9ce6f37ea1d21331f4804480d87e /src
parent3300021663ce97a5fd368438fa9dac5943aa6d25 (diff)
downloadsite-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 'src')
-rw-r--r--src/main.zig5
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);