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 @@...@@ -1,5 +1,5 @@
1const std = @import("std");1const std = @import("std");
2const .NAME = @import(".NAME");2const _LITNAME = @import(".NAME");
33
4pub fn main() !void {4pub fn main() !void {
5 // Prints to stderr, ignoring potential errors.5 // Prints to stderr, ignoring potential errors.
src/main.zig+6
...@@ -7426,6 +7426,12 @@ const Templates = struct {...@@ -7426,6 +7426,12 @@ const Templates = struct {
7426 }7426 }
7427 if (templates.strip and contents[i] == '\n') {7427 if (templates.strip and contents[i] == '\n') {
7428 new_line = true;7428 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 }
7429 } else if (contents[i] == '.') {7435 } else if (contents[i] == '.') {
7430 if (std.mem.startsWith(u8, contents[i..], ".LITNAME")) {7436 if (std.mem.startsWith(u8, contents[i..], ".LITNAME")) {
7431 try templates.buffer.append('.');7437 try templates.buffer.append('.');