From: Josh Triplett <josh@freedesktop.org>
Date: Thu, 8 Nov 2007 19:30:15 +0000 (-0800)
Subject: Fix table plugin to not generate an unbalanced tbody tag with header=no
X-Git-Tag: 2.12~24
X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/21c6d61aa1b6caee6c37994f81469041265df61f

Fix table plugin to not generate an unbalanced tbody tag with header=no

The table plugin omitted </tbody> with header=no, but always generated
<tbody>, resulting in an unbalanced tag.  Fix that by omitting <tbody>
too.
---

diff --git a/IkiWiki/Plugin/table.pm b/IkiWiki/Plugin/table.pm
index e8df17487..02a2ba05d 100644
--- a/IkiWiki/Plugin/table.pm
+++ b/IkiWiki/Plugin/table.pm
@@ -78,7 +78,7 @@ sub preprocess (@) { #{{{
 	push @lines, "\t<thead>",
 		genrow($params{page}, $params{destpage}, "th", @$header),
 	        "\t</thead>" if defined $header;
-	push @lines, "\t<tbody>";
+	push @lines, "\t<tbody>" if defined $header;
 	push @lines, genrow($params{page}, $params{destpage}, "td", @$_)
 		foreach @data;
 	push @lines, "\t</tbody>" if defined $header;