projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50faf0b
)
optimisation: detect scan mode and avoid generating image
author
Joey Hess
<joey@kodama.kitenet.net>
Wed, 9 Jan 2008 07:31:11 +0000
(
02:31
-0500)
committer
Joey Hess
<joey@kodama.kitenet.net>
Wed, 9 Jan 2008 07:31:11 +0000
(
02:31
-0500)
IkiWiki/Plugin/img.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/img.pm
b/IkiWiki/Plugin/img.pm
index 88a3d7b4d6f299a4f46efceb21a6cac75f73fbf6..b6e7c9e41db20db9639ec7927a2994a0560a799e 100644
(file)
--- a/
IkiWiki/Plugin/img.pm
+++ b/
IkiWiki/Plugin/img.pm
@@
-32,6
+32,11
@@
sub preprocess (@) { #{{{
}
push @{$links{$params{page}}}, $image;
+ # optimisation: detect scan mode, and avoid generating the image
+ if (! defined wantarray) {
+ return;
+ }
+
my $file = bestlink($params{page}, $image);
my $dir = $params{page};