diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 07:12:25 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | d13ae04008e678ed992e6181487dbfd126a4154f (patch) | |
| tree | 54c2460c28eed783683206cc1685fa958a786589 /src/look.zig | |
| parent | 9ecabb15b648237cca94253a7abc4b556805fde0 (diff) | |
| download | pardes-d13ae04008e678ed992e6181487dbfd126a4154f.tar.gz pardes-d13ae04008e678ed992e6181487dbfd126a4154f.zip | |
A look line takes `?re?` after its colon, as addr does
`file:?foo?`, `@p5:?foo?` and `:?foo?` were not taken for addresses (the
first character had to be one of `0-9+-/$.#,;`), so they went the path
way and found nothing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/look.zig')
| -rw-r--r-- | src/look.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/look.zig b/src/look.zig index cfebd42d..92e711fa 100644 --- a/src/look.zig +++ b/src/look.zig @@ -1266,7 +1266,7 @@ fn addressed(tok: []const u8) ?struct { path: []const u8, expr: []const u8 } { // pattern in the address may (`calc.py:/return a/`). if (std.mem.indexOfAny(u8, tok[0..colon], " \t") != null) return null; if (std.mem.indexOfAny(u8, expr, " \t") != null and std.mem.indexOfAny(u8, expr, "/?") == null) return null; - if (expr.len == 0 or std.mem.indexOfScalar(u8, "0123456789+-/$.#,;", expr[0]) == null) return null; + if (expr.len == 0 or std.mem.indexOfScalar(u8, "0123456789+-/?$.#,;", expr[0]) == null) return null; if (std.ascii.isDigit(expr[0])) { const pl = parsePathLine(tok); if (pl.at.line != 0 and pl.end == tok.len) return null; |
