X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/aa306957bac11477b914ac19b93890184ffe4062..577eed0e7efaf1844d5e3f18a95e699f1bc831c5:/IkiWiki/Plugin/linkmap.pm diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm index 0137476ac..d0671ae0e 100644 --- a/IkiWiki/Plugin/linkmap.pm +++ b/IkiWiki/Plugin/linkmap.pm @@ -28,8 +28,8 @@ sub preprocess (@) { $params{pages}="*" unless defined $params{pages}; - # Needs to update whenever a page is added or removed, so - # register a dependency. + # Needs to update whenever a page is added, removed, or + # its links change, so register a dependency. add_depends($params{page}, $params{pages}); # Can't just return the linkmap here, since the htmlscrubber @@ -56,9 +56,10 @@ sub genmap ($) { # Get all the items to map. my %mapitems = (); - foreach my $item (pagespec_match_list([keys %links], - $params{pages}, location => $params{page})) { - $mapitems{$item}=urlto($item, $params{destpage}); + foreach my $item (keys %links) { + if (pagespec_match($item, $params{pages}, location => $params{page})) { + $mapitems{$item}=urlto($item, $params{destpage}); + } } my $dest=$params{page}."/linkmap.png";