diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-04-23 15:45:30 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-04-23 15:45:30 -0400 |
commit | aa306957bac11477b914ac19b93890184ffe4062 (patch) | |
tree | c9b05bf73cb4d19e55297ad3b335bb1fc3ce67e5 /IkiWiki/Plugin/linkmap.pm | |
parent | 527d178c12141d2467dfa86492e249d021b88997 (diff) |
pagespec_match_list added and used in most appropriate places
* pagespec_match_list: New API function, matches pages in a list
and throws an error if the pagespec is bad.
* inline, brokenlinks, calendar, linkmap, map, orphans, pagecount,
pagestate, postsparkline: Display a handy error message if the pagespec
is erronious.
Diffstat (limited to 'IkiWiki/Plugin/linkmap.pm')
-rw-r--r-- | IkiWiki/Plugin/linkmap.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm index 941ed5f36..0137476ac 100644 --- a/IkiWiki/Plugin/linkmap.pm +++ b/IkiWiki/Plugin/linkmap.pm @@ -56,10 +56,9 @@ sub genmap ($) { # Get all the items to map. my %mapitems = (); - foreach my $item (keys %links) { - if (pagespec_match($item, $params{pages}, location => $params{page})) { - $mapitems{$item}=urlto($item, $params{destpage}); - } + foreach my $item (pagespec_match_list([keys %links], + $params{pages}, location => $params{page})) { + $mapitems{$item}=urlto($item, $params{destpage}); } my $dest=$params{page}."/linkmap.png"; |