mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
zig init: appease zig fmt check
last commit introduced a templated variable name that made zig fmt angry
This commit is contained in:
parent
1116d88196
commit
041eedc1cf
@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
const .NAME = @import(".NAME");
|
||||
const _LITNAME = @import(".NAME");
|
||||
|
||||
pub fn main() !void {
|
||||
// Prints to stderr, ignoring potential errors.
|
||||
|
||||
@ -7426,6 +7426,12 @@ const Templates = struct {
|
||||
}
|
||||
if (templates.strip and contents[i] == '\n') {
|
||||
new_line = true;
|
||||
} else if (contents[i] == '_') {
|
||||
if (std.mem.startsWith(u8, contents[i..], "_LITNAME")) {
|
||||
try templates.buffer.appendSlice(root_name);
|
||||
i += "_LITNAME".len;
|
||||
continue;
|
||||
}
|
||||
} else if (contents[i] == '.') {
|
||||
if (std.mem.startsWith(u8, contents[i..], ".LITNAME")) {
|
||||
try templates.buffer.append('.');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user