diff --git a/internal/html/repo_breadcrumb.templ b/internal/html/repo_breadcrumb.templ index 5a4482c45379a609e1ea91f54453c55f716bf2f6..cf88dc2b68517917fea7e283baf311c516114e8c 100644 --- a/internal/html/repo_breadcrumb.templ +++ b/internal/html/repo_breadcrumb.templ @@ -3,7 +3,6 @@ import ( "fmt" "strings" - "path" ) type RepoBreadcrumbComponentContext struct { @@ -23,13 +22,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: path.Join(breadcrumbs[idx].href, part), + href: breadcrumbs[idx].href + "/" + part, }) } breadcrumbs[len(breadcrumbs)-1].end = true diff --git a/internal/html/repo_breadcrumb_templ.go b/internal/html/repo_breadcrumb_templ.go index 98fc5568d23f56dc9bb9eaadbac65b1a39456120..85f23791682a3b1a4d4805258db980e87526f423 100644 --- a/internal/html/repo_breadcrumb_templ.go +++ b/internal/html/repo_breadcrumb_templ.go @@ -13,8 +13,6 @@ import ( "fmt" // Code generated by templ - DO NOT EDIT. - -// Code generated by templ - DO NOT EDIT. // templ: version: v0.2.707 ) @@ -35,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: path.Join(breadcrumbs[idx].href, part), + href: breadcrumbs[idx].href + "/" + part, }) } breadcrumbs[len(breadcrumbs)-1].end = true @@ -75,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: 44, Col: 24} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_breadcrumb.templ`, Line: 43, Col: 24} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -102,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: 46, Col: 134} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_breadcrumb.templ`, Line: 45, Col: 134} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -115,8 +113,7 @@ } var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(" / ") if templ_7745c5c3_Err != nil { -import "context" import "bytes" } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil {