hswg: deduplicate backlinks

This commit is contained in:
Přemysl Eric Janouch 2020-08-15 07:19:53 +02:00
parent d0ce3e3e66
commit f7f892fb59
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 5 additions and 2 deletions

View File

@ -236,9 +236,12 @@ func main() {
sort.Strings(e.backlinks)
backlinks := []string{}
backlinks, last := []string{}, ""
for _, name := range e.backlinks {
backlinks = append(backlinks, makeLink(&entries, name))
if name != last {
backlinks = append(backlinks, makeLink(&entries, name))
}
last = name
}
if len(backlinks) > 0 {