authorgravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2025-06-02 15:42:21+02:00
committergravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2025-06-02 15:42:21+02:00
log041eedc1cf2a5b7d6489a44cee8a5037a4af675f
tree4fa88fbcfff040df14a978a222673a11d6526a35
parent1116d881965ed8c0009f2d5bb4f97eed605c4ec0

zig init: appease zig fmt check

last commit introduced a templated variable name that made zig fmt angry

2 files changed, 7 insertions(+), 1 deletions(-)

lib/init/src/main.zig+1-1
......@@ -1,5 +1,5 @@
11const std = @import("std");
2const .NAME = @import(".NAME");
2const _LITNAME = @import(".NAME");
33
44pub fn main() !void {
55 // Prints to stderr, ignoring potential errors.
src/main.zig+6
......@@ -7426,6 +7426,12 @@ const Templates = struct {
74267426 }
74277427 if (templates.strip and contents[i] == '\n') {
74287428 new_line = true;
7429 } else if (contents[i] == '_') {
7430 if (std.mem.startsWith(u8, contents[i..], "_LITNAME")) {
7431 try templates.buffer.appendSlice(root_name);
7432 i += "_LITNAME".len;
7433 continue;
7434 }
74297435 } else if (contents[i] == '.') {
74307436 if (std.mem.startsWith(u8, contents[i..], ".LITNAME")) {
74317437 try templates.buffer.append('.');