From 028d7013a894d2ee8a76afe2e24c2a1ef3ee69c2 Mon Sep 17 00:00:00 2001 From: yangshangbo <42314632+yangshangbo@users.noreply.github.com> Date: Tue, 15 Apr 2025 15:56:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96**=E6=9B=BF=E6=8D=A2=E6=AD=A3?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hono/app.v | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hono/app.v b/hono/app.v index 95328b3..1b4e7d4 100644 --- a/hono/app.v +++ b/hono/app.v @@ -74,10 +74,7 @@ fn match_path_with_regex(real_path string, reg_path string) (bool, regex.RE) { start := time.now() mut one_more_star_reg := regex.regex_opt(r'\*{2,}') or { panic(err) } repl_on_e_more_star_fn := fn (re regex.RE, in_txt string, start int, end int) string { - if in_txt.ends_with('*') { - return r'([^#\?]/){0,}[^#\?]+' - } - return r'([^#\?]+//){0,}[^#\?]+' + return r'[^#\?]+' } mut replaced_reg_path := reg_path.replace('?', r'\?') replaced_reg_path = replaced_reg_path.replace('+', r'\+')