diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-08-23 05:41:07 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-08-23 05:41:07 +0000 |
commit | 9d7375c3b263e77da29a5db22af480db8b99d990 (patch) | |
tree | 8cb9407a3893060b7868d8960db3ce0759092c2e /IkiWiki/Render.pm | |
parent | 78b279c3d8c803391a5a4fc59ffd7855ce8bc5f5 (diff) | |
download | ikiwiki-9d7375c3b263e77da29a5db22af480db8b99d990.tar ikiwiki-9d7375c3b263e77da29a5db22af480db8b99d990.tar.gz |
* Allow preprocessor directives to contain python-like triple-quoted
text blocks, for easy nesting of quotes inside.
* Add a template plugin.
* Use the template plugin to add infoboxes to each plugin page listing basic
info about the plugin.
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r-- | IkiWiki/Render.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 8657dc380..38bfcdfcb 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -104,12 +104,12 @@ sub preprocess ($$$;$) { #{{{ # Note: preserve order of params, some plugins may # consider it significant. my @params; - while ($params =~ /(?:(\w+)=)?(?:"([^"]+)"|(\S+))(?:\s+|$)/g) { + while ($params =~ /(?:(\w+)=)?(?:"""(.+)"""|"([^"]+)"|(\S+))(?:\s+|$)/g) { if (defined $1) { - push @params, $1, (defined $2 ? $2 : $3); + push @params, $1, (defined $2 ? $2 : (defined $3 ? $3 : $4)); } else { - push @params, (defined $2 ? $2 : $3), ''; + push @params, (defined $2 ? $2 : (defined $3 ? $3 : $4)), ''; } } return $hooks{preprocess}{$command}{call}->( @@ -123,7 +123,7 @@ sub preprocess ($$$;$) { #{{{ } }; - $content =~ s{(\\?)\[\[(\w+)\s+((?:(?:\w+=)?(?:"[^"]+"|[^\s\]]+)\s*)*)\]\]}{$handle->($1, $2, $3)}eg; + $content =~ s{(\\?)\[\[(\w+)\s+((?:(?:\w+=)?(?:""".+"""|"[^"]+"|[^\s\]]+)\s*)*)\]\]}{$handle->($1, $2, $3)}eg; return $content; } #}}} |