From 6dc8abd6b3c7ea02e60b1a799bcb49a31b3aeaa8 Mon Sep 17 00:00:00 2001 From: Arnas Udovicius Date: Sun, 21 Aug 2022 19:35:05 +0300 Subject: [PATCH] unicode in filename --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index fe43b99..06c9c12 100644 --- a/main.go +++ b/main.go @@ -96,7 +96,7 @@ func process(_ context.Context, w gemini.ResponseWriter, r *gemini.Request) { renderSearch(lang, w, r, client) case regexp.MustCompile(`^/(sgs|en)/f/?$`).MatchString(r.URL.Path): renderAllFiles(lang, w, client) - case regexp.MustCompile(`^/(sgs|en)/f/([\p{L}\d_+.]+/)+[\d\w]+/[\w_]+.gmi$`).MatchString(r.URL.Path): + case regexp.MustCompile(`^/(sgs|en)/f/([\p{L}\d_+.]+/)+[\d\w]+/[\p{L}\d_+.]+.gmi$`).MatchString(r.URL.Path): renderFile(lang, w, r, client) case regexp.MustCompile(`^/(sgs|en)/f/[\p{L}\d_+.]+(/[\p{L}\d_+.]+)*/?$`).MatchString(r.URL.Path): renderCategory(lang, w, r, client)