1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
diff --git a/internal/html/repo_breadcrumb_templ.go b/internal/html/repo_breadcrumb_templ.go
index 85f23791682a3b1a4d4805258db980e87526f423..98fc5568d23f56dc9bb9eaadbac65b1a39456120 100644
--- a/internal/html/repo_breadcrumb_templ.go
+++ b/internal/html/repo_breadcrumb_templ.go
@@ -12,6 +12,7 @@ import "bytes"
import (
"fmt"
+ "path"
"strings"
)
@@ -32,13 +33,13 @@ parts := strings.Split(r.Path, "/")
breadcrumbs := []breadcrumb{
{
label: r.Repo,
- href: fmt.Sprintf("/%s/tree/%s", r.Repo, r.Ref),
+ href: fmt.Sprintf("/%s/tree/%s/", r.Repo, r.Ref),
},
}
for idx, part := range parts {
breadcrumbs = append(breadcrumbs, breadcrumb{
label: part,
- href: breadcrumbs[idx].href + "/" + part,
+ href: path.Join(breadcrumbs[idx].href, part),
})
}
breadcrumbs[len(breadcrumbs)-1].end = true
@@ -72,7 +73,7 @@ }
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(crumb.label)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_breadcrumb.templ`, Line: 43, Col: 24}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_breadcrumb.templ`, Line: 44, Col: 24}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
@@ -99,7 +100,7 @@ }
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(crumb.label)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_breadcrumb.templ`, Line: 45, Col: 134}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_breadcrumb.templ`, Line: 46, Col: 134}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -112,7 +113,7 @@ }
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(" / ")
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_breadcrumb.templ`, Line: 46, Col: 12}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_breadcrumb.templ`, Line: 47, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
|