diff options
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r-- | IkiWiki/Render.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index e5a1679f8..690945c49 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -105,8 +105,13 @@ sub preprocess ($$;$) { #{{{ # Note: preserve order of params, some plugins may # consider it significant. my @params; - while ($params =~ /(\w+)=\"?([^"]+)"?(\s+|$)/g) { - push @params, $1, $2; + while ($params =~ /(?:(\w+)=)?(?:"([^"]+)"|(\S+))(?:\s+|$)/g) { + if (defined $1) { + push @params, $1, (defined $2 ? $2 : $3); + } + else { + push @params, (defined $2 ? $2 : $3), ''; + } } return $hooks{preprocess}{$command}{call}->(@params, page => $page); } |