aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm25
1 files changed, 19 insertions, 6 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index b0ac8bbb4..d001760a2 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -723,12 +723,25 @@ sub preprocess ($$$;$$) { #{{{
$command, $page, $preprocessing{$page}).
"]]";
}
- my $ret=$hooks{preprocess}{$command}{call}->(
- @params,
- page => $page,
- destpage => $destpage,
- preview => $preprocess_preview,
- );
+ my $ret;
+ if (! $scan) {
+ $ret=$hooks{preprocess}{$command}{call}->(
+ @params,
+ page => $page,
+ destpage => $destpage,
+ preview => $preprocess_preview,
+ );
+ }
+ else {
+ # use void context during scan pass
+ $hooks{preprocess}{$command}{call}->(
+ @params,
+ page => $page,
+ destpage => $destpage,
+ preview => $preprocess_preview,
+ );
+ $ret="";
+ }
$preprocessing{$page}--;
return $ret;
}