From ce1c7a3eab5fb2a0bcf639171a4f2dd2ef981963 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 29 Jul 2011 20:46:42 +0100 Subject: Revert "map: don't create useless \n"; + $map .= ($spaces x $indent) . "\n"; + if ($indent > 1) { + $map .= ($spaces x $indent) . "\n"; } + $indent--; } my @bits=split("/", $item); my $p=""; @@ -117,13 +120,14 @@ sub preprocess (@) { while ($depth > $indent) { $indent++; if ($indent > 1) { - $map .= "\n"; } $map .= "\n"; return $map; -- cgit v1.2.3 From af8712cfac73d7668e509abf97eeabb5e824c29b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 3 Aug 2012 12:53:25 +0100 Subject: map: postprocess to collapse useless \n"; + $map .= ($spaces x $indent) . "\n"; } $indent--; } @@ -120,7 +120,7 @@ sub preprocess (@) { while ($depth > $indent) { $indent++; if ($indent > 1) { - $map .= ($spaces x $indent) . "
    \n"; + $map .= ($spaces x $indent) . "
      \n"; } if ($depth > $indent) { $p.="/".shift(@bits); @@ -154,6 +154,8 @@ sub preprocess (@) { $indent--; $map .= ($spaces x $indent) . "
    \n"; } + $map =~ s{\n *
\n *
    \n}{\n}gs; + $map =~ s{}{}g; $map .= "\n"; return $map; } -- cgit v1.2.3 From 1d6eb13e2b3b7cf60f26ae4c5b631b0e65e34c5f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Mar 2013 13:00:33 -0400 Subject: Add missing plugin section, and deal with missing sections with a warning. --- IkiWiki/Plugin/underlay.pm | 1 + IkiWiki/Setup.pm | 4 ++++ debian/changelog | 1 + 3 files changed, 6 insertions(+) (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 3ea19c635..2967761c8 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 0, rebuild => undef, + section => "special-purpose", }, add_underlays => { type => "string", diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index 48f3d4634..881e8a9d5 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -223,6 +223,10 @@ sub commented_dump ($$) { my $setup=$pair->[1]; my %s=@{$setup}; my $section=$s{plugin}->{section}; + if (! defined $section) { + print STDERR "warning: missing section in $plugin\n"; + $section="other"; + } push @{$section_plugins{$section}}, $plugin; if (@{$section_plugins{$section}} == 1) { push @ret, "", $indent.("#" x 70), "$indent# $section plugins", diff --git a/debian/changelog b/debian/changelog index 7905ae6fc..85acaf530 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ ikiwiki (3.20130213) UNRELEASED; urgency=low * Allow dots in directive parameter names. (tango) + * Add missing plugin section, and deal with missing sections with a warning. -- Joey Hess Fri, 15 Feb 2013 17:23:12 -0400 -- cgit v1.2.3