]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
update
[ikiwiki.git] / IkiWiki / Render.pm
index ddd14692230a749b0cee57b6396279e4f236e9bd..5351ee7adedc9e09caff4d6df270ee15b9d8b989 100644 (file)
@@ -104,12 +104,14 @@ sub preprocess ($$$;$) { #{{{
                        # Note: preserve order of params, some plugins may
                        # consider it significant.
                        my @params;
-                       while ($params =~ /(?:(\w+)=)?(?:"([^"]+)"|(\S+))(?:\s+|$)/g) {
+                       while ($params =~ /(?:(\w+)=)?(?:"""\n?(.+)"""|"([^"]+)"|(\S+))(?:\s+|$)/sg) {
+                               my $val=(defined $2 ? $2 : (defined $3 ? $3 : $4));
+                               chomp $val;
                                if (defined $1) {
-                                       push @params, $1, (defined $2 ? $2 : $3);
+                                       push @params, $1, $val;
                                }
                                else {
-                                       push @params, (defined $2 ? $2 : $3), '';
+                                       push @params, $val, '';
                                }
                        }
                        return $hooks{preprocess}{$command}{call}->(
@@ -123,7 +125,7 @@ sub preprocess ($$$;$) { #{{{
                }
        };
        
-       $content =~ s{(\\?)$config{wiki_processor_regexp}}{$handle->($1, $2, $3)}eg;
+       $content =~ s{(\\?)\[\[(\w+)\s+((?:(?:\w+=)?(?:""".+"""|"[^"]+"|[^\s\]]+)\s*)*)\]\]}{$handle->($1, $2, $3)}eg;
        return $content;
 } #}}}