hswg: deduplicate backlinks
This commit is contained in:
parent
d0ce3e3e66
commit
f7f892fb59
|
@ -236,9 +236,12 @@ func main() {
|
||||||
|
|
||||||
sort.Strings(e.backlinks)
|
sort.Strings(e.backlinks)
|
||||||
|
|
||||||
backlinks := []string{}
|
backlinks, last := []string{}, ""
|
||||||
for _, name := range e.backlinks {
|
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 {
|
if len(backlinks) > 0 {
|
||||||
|
|
Loading…
Reference in New Issue