From 38618838c9f2700b3971c436ec9bee98b91a21e5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 26 Jul 2008 19:49:45 -0400 Subject: add example wrapper and fix formatting --- IkiWiki/Setup/Standard.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'IkiWiki') 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,"; -- cgit v1.2.3