From ab8d5e261a17b148b9736043ac517a40b18fbdce Mon Sep 17 00:00:00 2001 From: Erlend Lind Madsen Date: Fri, 2 Feb 2024 02:45:48 +0100 Subject: [PATCH 1/2] url: support dash '-' in urls --- src/config/url.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config/url.zig b/src/config/url.zig index 4feb343b0..e28ead1d8 100644 --- a/src/config/url.zig +++ b/src/config/url.zig @@ -22,7 +22,7 @@ const oni = @import("oniguruma"); /// /// There are many complicated cases where these heuristics break down, but /// handling them well requires a non-regex approach. -pub const regex = "(?:" ++ url_scheme ++ ")(?:[\\w./+:@%?=&]+(?:\\(\\w*\\))?)+(? Date: Fri, 2 Feb 2024 02:59:55 +0100 Subject: [PATCH 2/2] url: sort url schemes by most-used --- src/config/url.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/url.zig b/src/config/url.zig index e28ead1d8..8f32e8f16 100644 --- a/src/config/url.zig +++ b/src/config/url.zig @@ -23,7 +23,7 @@ const oni = @import("oniguruma"); /// There are many complicated cases where these heuristics break down, but /// handling them well requires a non-regex approach. pub const regex = "(?:" ++ url_scheme ++ ")(?:[\\w./+:@%?=&-]+(?:\\(\\w*\\))?)+(?