diff --git a/src/lib.zig b/src/lib.zig index e07a5b804ef693a2746e7f5a56daabd7e0f5bd21..648221b7921fdd08016b0023e588b815fbcae977 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -108,7 +108,7 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val inline for (v.children) |it| { try do(alloc, writer, it, data, ctx, .{ .Ctx = opts.Ctx, - .indent = opts.indent + 1, + .indent = if (shouldindent) opts.indent + 1 else opts.indent, .doindent = shouldindent, .doindent2 = opts.doindent2, });