authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-06-21 18:28:18 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-06-21 18:28:18 -07:00
log8401a1944fff76034468cbc9daf74f19aabfe8fb
tree2195bd96a9260e159e9a0409048b47198d6f02a2
parent82747c72ddaa89c023e454dd4a4cecd4773d5433

dont use zig-range anymore


2 files changed, 2 insertions(+), 4 deletions(-)

src/lib.zig+2-3
...@@ -9,7 +9,6 @@...@@ -9,7 +9,6 @@
99
10const std = @import("std");10const std = @import("std");
11const string = []const u8;11const string = []const u8;
12const range = @import("range").range;
13const htmlentities = @import("htmlentities");12const htmlentities = @import("htmlentities");
14const root = @import("root");13const root = @import("root");
1514
...@@ -47,7 +46,7 @@ inline fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.V...@@ -47,7 +46,7 @@ inline fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.V
47 }46 }
48 } else false;47 } else false;
4948
50 if (opts.flag1) for (range(opts.indent)) |_| try writer.writeAll(" ");49 if (opts.flag1) for (0..opts.indent) |_| try writer.writeAll(" ");
51 try writer.writeAll("<");50 try writer.writeAll("<");
52 try writer.writeAll(v.name);51 try writer.writeAll(v.name);
5352
...@@ -79,7 +78,7 @@ inline fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.V...@@ -79,7 +78,7 @@ inline fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.V
79 .flag1 = !hastext,78 .flag1 = !hastext,
80 });79 });
81 }80 }
82 if (!hastext) for (range(opts.indent)) |_| try writer.writeAll(" ");81 if (!hastext) for (0..opts.indent) |_| try writer.writeAll(" ");
83 try writer.print("</{s}>", .{v.name});82 try writer.print("</{s}>", .{v.name});
84 if (opts.flag1) try writer.writeAll("\n");83 if (opts.flag1) try writer.writeAll("\n");
85 }84 }
zig.mod-1
...@@ -4,5 +4,4 @@ main: src/lib.zig...@@ -4,5 +4,4 @@ main: src/lib.zig
4license: AGPL-3.04license: AGPL-3.0
5description: An HTML preprocessor with a builtin template engine.5description: An HTML preprocessor with a builtin template engine.
6dependencies:6dependencies:
7 - src: git https://github.com/nektro/zig-range
8 - src: git https://github.com/kivikakk/htmlentities.zig7 - src: git https://github.com/kivikakk/htmlentities.zig