diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-10-09 13:02:10 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-10-09 13:02:10 -0400 |
commit | 769b78df078d0287a10166ce828941a491858ff2 (patch) | |
tree | 4a418813976c146383d26678aa4df6aedec19b56 /IkiWiki.pm | |
parent | c7da9911580e9311981758922d354aea03b8074c (diff) | |
download | ikiwiki-769b78df078d0287a10166ce828941a491858ff2.tar ikiwiki-769b78df078d0287a10166ce828941a491858ff2.tar.gz |
pagespec_match_list allow additional pagespec limit parameters again
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 475e278c3..f959d868b 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2019,21 +2019,25 @@ sub pagespec_match_list ($$;@) { @candidates=reverse(@candidates) if $params{reverse}; + $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); + + # clear params, remainder is passed to pagespec + my $num=$params{num}; + delete @params{qw{num deptype reverse sort limit}}; + my @matches; my $firstfail; my $count=0; foreach my $p (@candidates) { - my $r=$sub->($p, location => $page); + my $r=$sub->($p, %params, location => $page); if ($r) { push @matches, [$p, $r]; - last if defined $params{num} && ++$count == $params{num}; + last if defined $num && ++$count == $num; } elsif (! defined $firstfail) { $firstfail=$r; } } - - $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); my @ret; if (@matches) { |