aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-09 13:02:10 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-09 13:02:10 -0400
commit769b78df078d0287a10166ce828941a491858ff2 (patch)
tree4a418813976c146383d26678aa4df6aedec19b56 /IkiWiki.pm
parentc7da9911580e9311981758922d354aea03b8074c (diff)
downloadikiwiki-769b78df078d0287a10166ce828941a491858ff2.tar
ikiwiki-769b78df078d0287a10166ce828941a491858ff2.tar.gz
pagespec_match_list allow additional pagespec limit parameters again
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm12
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) {