]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
don't set values for verbose and syslog by default
[ikiwiki.git] / IkiWiki.pm
index 051c11b43c2633a66bee8aa9a4f11b1c7ed24fc9..bf4a0d415ab0afc7270f25ca1ab9a7b4c2187a10 100644 (file)
@@ -172,14 +172,14 @@ sub getsetup () { #{{{
        },
        verbose => {
                type => "boolean",
-               default => 0,
+               example => 1,
                description => "display verbose messages when building?",
                safe => 1,
                rebuild => 0,
        },
        syslog => {
                type => "boolean",
-               default => 0,
+               example => 1,
                description => "log to syslog?",
                safe => 1,
                rebuild => 0,
@@ -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;
 } #}}}