From 77ee47c18f93a01f209a419b0f1f2d4d50d80cd0 Mon Sep 17 00:00:00 2001 From: Ben Kircher Date: Sun, 8 Feb 2026 21:29:01 +0100 Subject: [PATCH] url: fix partial match of mid string $-variable A string like this foo/$BAR/baz should match fully, not partially. This commit fixes this by expanding `\$[A-Za-z_]\w*\/` to `(?:[\w][\w\-.]*\/)*\$[A-Za-z_]\w*\/` in rooted_or_relative_path_prefix so that we optionally eat everything before a variable `$VAR/`. --- src/config/url.zig | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/config/url.zig b/src/config/url.zig index 96bcc04b7..c43427d24 100644 --- a/src/config/url.zig +++ b/src/config/url.zig @@ -75,7 +75,7 @@ const scheme_url_branch = no_trailing_punctuation; const rooted_or_relative_path_prefix = - \\(?:\.\.\/|\.\/|~\/|\$[A-Za-z_]\w*\/|\.[\w][\w\-.]*\/|(?