From: Joey Hess Date: Mon, 4 Aug 2008 18:58:21 +0000 (-0400) Subject: improve fix to DTRT for a param of "0" X-Git-Tag: 2.53.1~26 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/b1d0ce627c5557497ec9d527c39493806f8ef37a improve fix to DTRT for a param of "0" (cherry picked from commit 6f2d1536b8ce0bd746c87c00466170435ddb3923) --- diff --git a/IkiWiki.pm b/IkiWiki.pm index e0793b5fa..4de8f71d6 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -718,7 +718,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}) { @@ -844,8 +846,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; } #}}} diff --git a/debian/changelog b/debian/changelog index adfa2c2f0..e1a8be97f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (2.54) UNRELEASED; urgency=low + + * Fix uninitialised value warning from a [[!foo]] preprocessor directive + with no whitespace. + + -- Joey Hess Tue, 26 Aug 2008 12:18:36 -0400 + ikiwiki (2.53) unstable; urgency=low * search: generate configuration files once only when rebuilding