Skip to content

Commit 5f0a5d0

Browse files
committed
fix: back to the top link when no repo
1 parent 45255b7 commit 5f0a5d0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

scripts/website/expand_templates/linters.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ func getLintersListMarkdown(enabled bool) string {
9090
}
9191

9292
func getName(lc *types.LinterWrapper) string {
93-
name := lc.Name
93+
name := spanWithID(listItemPrefix+lc.Name, "", "")
9494

9595
if hasSettings(lc.Name) {
96-
name = fmt.Sprintf("[%[1]s](#%[2]s \"%[1]s configuration\")", name, lc.Name)
96+
name += fmt.Sprintf("[%[1]s](#%[1]s \"%[1]s configuration\")", lc.Name)
9797
} else {
98-
name = fmt.Sprintf("%s [%s](#%s)", spanWithID(lc.Name, "", ""), name, lc.Name)
98+
name += fmt.Sprintf("%[1]s[%[2]s](#%[2]s)", spanWithID(lc.Name, "", ""), lc.Name)
9999
}
100100

101101
if lc.OriginalURL != "" {
@@ -104,9 +104,7 @@ func getName(lc *types.LinterWrapper) string {
104104
icon = "<FaGitlab size={'0.8rem'} />"
105105
}
106106

107-
name = fmt.Sprintf("%s%s&nbsp;[%s](%s)",
108-
spanWithID(listItemPrefix+lc.Name, "", ""),
109-
name,
107+
name += fmt.Sprintf("&nbsp;[%s](%s)",
110108
span(lc.Name+" repository", icon),
111109
lc.OriginalURL,
112110
)

0 commit comments

Comments
 (0)