hswg: deduplicate backlinks
This commit is contained in:
parent
d0ce3e3e66
commit
f7f892fb59
|
@ -236,10 +236,13 @@ func main() {
|
|||
|
||||
sort.Strings(e.backlinks)
|
||||
|
||||
backlinks := []string{}
|
||||
backlinks, last := []string{}, ""
|
||||
for _, name := range e.backlinks {
|
||||
if name != last {
|
||||
backlinks = append(backlinks, makeLink(&entries, name))
|
||||
}
|
||||
last = name
|
||||
}
|
||||
|
||||
if len(backlinks) > 0 {
|
||||
_, _ = f.WriteString(fmt.Sprintf("<p id=links>Links here: %s</p>\n",
|
||||
|
|
Loading…
Reference in New Issue