From b1d0ce627c5557497ec9d527c39493806f8ef37a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Aug 2008 14:58:21 -0400 Subject: [PATCH] improve fix to DTRT for a param of "0" (cherry picked from commit 6f2d1536b8ce0bd746c87c00466170435ddb3923) --- IkiWiki.pm | 7 ++++--- debian/changelog | 7 +++++++ 2 files changed, 11 insertions(+), 3 deletions(-) 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 -- 2.39.2