X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/2876b76b7b654f43dd1668c4a963a049450ed66c..f77b44a0b81543dbb467122d73ae30c3caba473f:/Shiar_Sheet/FormatChar.pm diff --git a/Shiar_Sheet/FormatChar.pm b/Shiar_Sheet/FormatChar.pm index ee0c310..78e4a21 100644 --- a/Shiar_Sheet/FormatChar.pm +++ b/Shiar_Sheet/FormatChar.pm @@ -181,10 +181,12 @@ sub cell { } } - return sprintf('%s%s', - defined $title ? qq{ title="$title"} : '', - @class ? sprintf(' class="%s"', join ' ', @class) : '', - $html || '', + return sprintf('<%s>%s%s', + join(' ', 'td', + defined $title ? qq{ title="$title"} : (), + @class ? sprintf('class="%s"', join ' ', @class) : (), + $html || (), + ), $cell eq '' ? ' ' : $cell, $anno, ); @@ -225,9 +227,17 @@ sub table { $colspan++; next; } + elsif ($cell eq '>-') { + $rows[-1] .= ''; + next; + } + elsif ($cell =~ m/^'.$cell; + next; + } $rows[-1] .= $self->cell($cell, - $colspan > 1 && qq{ colspan="$colspan"}, + $colspan > 1 && qq{colspan="$colspan"}, ); $colspan = 1;