X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/e20a73e69afd8061db197eb607700ce66ac70552..a3f9b6de6bde0cd3f32faee7e4c982f6e7d42aaf:/Shiar_Sheet/FormatChar.pm diff --git a/Shiar_Sheet/FormatChar.pm b/Shiar_Sheet/FormatChar.pm index 9a00276..c0a4cb0 100644 --- a/Shiar_Sheet/FormatChar.pm +++ b/Shiar_Sheet/FormatChar.pm @@ -136,7 +136,7 @@ sub cell { if ($input =~ /[ -~]/) { push @class, 'l5', 'u-ascii'; # ascii } - elsif ($input =~ /^\p{in=6.0}+$/) { + elsif ($input =~ /^\p{in=6.0}+$/ and $input !~ /\p{Co}/) { push @class, 'l2'; # in unicode 6.0 } else { @@ -173,8 +173,8 @@ sub cell { } } else { - if ($_ eq 'hex' or $cell =~ /^[^a-zA-Z]$/) { - $anno = sprintf(' %04X', 'value', ord $cell); + if ($_ eq 'hex' or $input =~ /^[^a-zA-Z]$/) { + $anno = sprintf(' %04X', 'value', ord $input); last; } } @@ -248,11 +248,15 @@ sub table { my @colheads; while ($digraphs->[0] !~ /^\./) { my $cell = shift @$digraphs or last; + if ($cell eq '>') { + push @colheads, ''; + next; + } push @colheads, join('', '<', $cell =~ s/^-// ? 'td' : 'th', $cell =~ s/:(.*)// && qq{ title="$1"}, - $cell =~ s/^>// && ' colspan=2', + $cell =~ s/^(>+)// && ' colspan='.(length($1) + 1), '>', $cell eq '_' ? ' ' : $cell );