From e3881c4ffcd0e6ef9d9b6bb00c32055a79e86c52 Mon Sep 17 00:00:00 2001 From: Erlend Lind Madsen Date: Wed, 28 Aug 2024 22:29:57 +0200 Subject: [PATCH] avoid escape characters by using a multiline string lets concat url_scheme in combo with a multiline (thanks @qwerasd205) regex: url_scheme -> url_schemes --- src/config/url.zig | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/config/url.zig b/src/config/url.zig index ad98860a5..d7c1ab2a2 100644 --- a/src/config/url.zig +++ b/src/config/url.zig @@ -22,8 +22,13 @@ 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*\\))?)+(?