diff options
author | Joey Hess <joey@kitenet.net> | 2007-12-16 16:42:18 -0500 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2007-12-16 16:42:18 -0500 |
commit | c3fed25ad4d301a8e901cf46ba9d11dbf6866d03 (patch) | |
tree | bc115228ce56390f169d87557dd833b4387a207f /IkiWiki/Plugin | |
parent | b17ee42a2775b78329b3d26041f07243ca41841a (diff) |
* brokenlinks: Don't list the same link multiple times. (%links might
contain multiple copies of the same link)
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/brokenlinks.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm index ef5837a58..0295a8fe6 100644 --- a/IkiWiki/Plugin/brokenlinks.pm +++ b/IkiWiki/Plugin/brokenlinks.pm @@ -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; |