printf '<tr id="%s">', (lc $title) =~ s/<[^>]+>//gr =~ s/\s+/-/gr;
say '<th>', $title;
my $colspan = 1;
+ my $col = 0;
for (@{$cells}) {
+ $col++;
if ($_ eq '>') {
$colspan++;
next;
print " colspan=$colspan";
$colspan = 1;
}
+ print ' hidden' if $col > 26; # sample only
print ' class=', $_ ? 'ex' : 'u-invalid' if s/^-//;
print '>';
say;