projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86674c9
)
improve fix to DTRT for a param of "0"
author
Joey Hess
<joey@kodama.kitenet.net>
Mon, 4 Aug 2008 18:58:21 +0000
(14:58 -0400)
committer
Joey Hess
<joey@kodama.kitenet.net>
Mon, 4 Aug 2008 18:58:21 +0000
(14:58 -0400)
IkiWiki.pm
patch
|
blob
|
history
diff --git
a/IkiWiki.pm
b/IkiWiki.pm
index 051c11b43c2633a66bee8aa9a4f11b1c7ed24fc9..207bf3079a2083ccf047837af6601168d938ada8 100644
(file)
--- a/
IkiWiki.pm
+++ b/
IkiWiki.pm
@@
-1043,7
+1043,9
@@
sub preprocess ($$$;$$) { #{{{
my $prefix=shift;
my $command=shift;
my $params=shift;
- if (length $escape) {
+ $params="" if ! defined $params;
+
+ f (length $escape) {
return "[[$prefix$command $params]]";
}
elsif (exists $hooks{preprocess}{$command}) {
@@
-1176,8
+1178,7
@@
sub preprocess ($$$;$$) { #{{{
}sx;
}
- # $4 can be undef if the directive was [[!foo]]
- $content =~ s{$regex}{$handle->($1, $2, $3, ($4 or ""))}eg;
+ $content =~ s{$regex}{$handle->($1, $2, $3, $4)}eg;
return $content;
} #}}}