From 0c1708e450b9cf8d6fc7b149ea9e02fdf62c20e0 Mon Sep 17 00:00:00 2001 From: ston1th Date: Mon, 10 Oct 2022 18:34:48 +0200 Subject: [PATCH] fixed / anchor --- pkg/srv/interceptor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/srv/interceptor.go b/pkg/srv/interceptor.go index ac1c5f6..a1c4d7f 100644 --- a/pkg/srv/interceptor.go +++ b/pkg/srv/interceptor.go @@ -118,7 +118,9 @@ func (r *responseInterceptor) GetPaths(path string, filesystem *fs.FS, relative } dc.Base = path path = strings.TrimSuffix(path, "/") - pa = "#" + anchor(path) + if path != "/" && path != "" { + pa = "#" + anchor(path) + } for _, p := range dc.AllPaths { p = xmldecode(p) name := template.HTML(p)