]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Fix table plugin to not generate an unbalanced tbody tag with header=no
authorJosh Triplett <josh@freedesktop.org>
Thu, 8 Nov 2007 19:30:15 +0000 (11:30 -0800)
committerJosh Triplett <josh@freedesktop.org>
Thu, 8 Nov 2007 19:30:15 +0000 (11:30 -0800)
The table plugin omitted </tbody> with header=no, but always generated
<tbody>, resulting in an unbalanced tag.  Fix that by omitting <tbody>
too.

IkiWiki/Plugin/table.pm

index e8df174871b7bde8383fd3f93131958b9e2a9e25..02a2ba05dacc5aa67ed842489b909a8982a985c4 100644 (file)
@@ -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;