summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm2
-rw-r--r--IkiWiki/Plugin/pagecount.pm4
2 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index e260fffea..e8c0c7abc 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1837,6 +1837,8 @@ sub pagespec_match_list ($$;@) {
my $spec=shift;
my @params=@_;
+ return @$pages if $spec eq '*'; # optimisation
+
my $sub=pagespec_translate($spec);
error "syntax error in pagespec \"$spec\""
if $@ || ! defined $sub;
diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm
index f8881a04b..a561e58e5 100644
--- a/IkiWiki/Plugin/pagecount.pm
+++ b/IkiWiki/Plugin/pagecount.pm
@@ -26,9 +26,7 @@ sub preprocess (@) {
# register a dependency.
add_depends($params{page}, $params{pages});
- my @pages=keys %pagesources;
- @pages=pagespec_match_list(\@pages, $params{pages}, location => $params{page})
- if $params{pages} ne "*"; # optimisation;
+ my @pages=pagespec_match_list([keys %pagesources], $params{pages}, location => $params{page});
return $#pages+1;
}