authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-24 03:01:44 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-24 03:01:44 -07:00
log7ed7fe9015633b2361809a0b8b71a1fd1f3e665b
treeae11d0a0fdb3d7ae7b06e0117372e2862a10c324
parent5e64e87684e9acf1d5cf5a24d23492f4f3b2b36a
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

replacement: work on 'foo.bar?' not just 'foo?.bar'


1 files changed, 5 insertions(+), 0 deletions(-)

src/lib.zig+5
...@@ -155,6 +155,11 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val...@@ -155,6 +155,11 @@ fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Val
155 if (!opts.escaped) try writer.writeAll(s);155 if (!opts.escaped) try writer.writeAll(s);
156 return;156 return;
157 }157 }
158 if (TI == .optional) {
159 if (comptime extras.isZigString(std.meta.Child(TO))) {
160 return writeReplacementString(writer, repl.raw, opts.escaped, x.?);
161 }
162 }
158 return x.nprint(writer);163 return x.nprint(writer);
159 },164 },
160 .block => |v| {165 .block => |v| {