aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-03-08 18:57:47 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-03-08 18:57:47 -0400
commitdd2fa2efb956f8af6c98d37f8cfd280df2f97cb5 (patch)
treeddafc87fb26cca22009a931db1f244bbb56249eb /IkiWiki
parentd3b4c2dbd13f6721042db7a7b6843851c9037551 (diff)
downloadikiwiki-dd2fa2efb956f8af6c98d37f8cfd280df2f97cb5.tar
ikiwiki-dd2fa2efb956f8af6c98d37f8cfd280df2f97cb5.tar.gz
When loading a template in scan mode, let preprocess know it only needs to scan.
This makes wikis such as zack's much faster in the scan pass. In that pass, when a template contains an inline, there is no reason to process the entire inline and all its pages. I'd forgotten to pass along the flag to let preprocess() know it was in scan mode, leading to much unncessary churning.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/template.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm
index b872f0962..b6097bb49 100644
--- a/IkiWiki/Plugin/template.pm
+++ b/IkiWiki/Plugin/template.pm
@@ -69,9 +69,13 @@ sub preprocess (@) {
}
}
+ # This needs to run even in scan mode, in order to process
+ # links and other metadata includes via the template.
+ my $scan=! defined wantarray;
+
return IkiWiki::preprocess($params{page}, $params{destpage},
IkiWiki::filter($params{page}, $params{destpage},
- $template->output));
+ $template->output), $scan);
}
1