]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/brokenlinks.pm
Use correct term prefixes when searching.
[ikiwiki.git] / IkiWiki / Plugin / brokenlinks.pm
index ef5837a5876c44b1082a3556d5cabe75cd24c7ef..0295a8fe6b570d7b49503ba6587ae41a28f0cfa7 100644 (file)
@@ -22,7 +22,10 @@ sub preprocess (@) { #{{{
        foreach my $page (keys %links) {
                if (pagespec_match($page, $params{pages}, location => $params{page})) {
                        my $discussion=gettext("discussion");
+                       my %seen;
                        foreach my $link (@{$links{$page}}) {
+                               next if $seen{$link};
+                               $seen{$link}=1;
                                next if $link =~ /.*\/\Q$discussion\E/i && $config{discussion};
                                my $bestlink=bestlink($page, $link);
                                next if length $bestlink;