aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Setup
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-26 19:49:45 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-26 19:49:45 -0400
commit38618838c9f2700b3971c436ec9bee98b91a21e5 (patch)
treeebae7a7a5157e6acaeb224ea37c0ae3a450e40bf /IkiWiki/Setup
parentc56618133cc3e0106e75b63cf91906037ea629ea (diff)
downloadikiwiki-38618838c9f2700b3971c436ec9bee98b91a21e5.tar
ikiwiki-38618838c9f2700b3971c436ec9bee98b91a21e5.tar.gz
add example wrapper and fix formatting
Diffstat (limited to 'IkiWiki/Setup')
-rw-r--r--IkiWiki/Setup/Standard.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm
index e82425c71..d1c53c064 100644
--- a/IkiWiki/Setup/Standard.pm
+++ b/IkiWiki/Setup/Standard.pm
@@ -40,7 +40,17 @@ sub dumpline ($$$$) { #{{{
else {
$dumpedvalue=Dumper($value);
chomp $dumpedvalue;
+ if (length $prefix) {
+ # add to second and subsequent lines
+ my @lines=split(/\n/, $dumpedvalue);
+ $dumpedvalue="";
+ for (my $x=0; $x <= $#lines; $x++) {
+ $lines[$x] =~ s/^\t//;
+ $dumpedvalue.="\t".($x ? $prefix : "").$lines[$x]."\n";
+ }
+ }
$dumpedvalue=~s/^\t//;
+ chomp $dumpedvalue;
}
return "\t$prefix$key => $dumpedvalue,";