X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/a748ed6eb94a8cb8b7cf09ef9f87104e8f371f82..e42bf56734a8ef1b890fb42df3dbb719456de225:/Shiar_Sheet/FormatChar.pm
diff --git a/Shiar_Sheet/FormatChar.pm b/Shiar_Sheet/FormatChar.pm
index 839144f..d7c59c1 100644
--- a/Shiar_Sheet/FormatChar.pm
+++ b/Shiar_Sheet/FormatChar.pm
@@ -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,10 +248,12 @@ sub table {
my @colheads;
while ($digraphs->[0] !~ /^\./) {
my $cell = shift @$digraphs or last;
- push @colheads, sprintf(
- '<%s%s>%s',
+ push @colheads, join('',
+ '<',
$cell =~ s/^-// ? 'td' : 'th',
- $cell =~ s/:(.*)// ? qq{ title="$1"} : '',
+ $cell =~ s/:(.*)// && qq{ title="$1"},
+ $cell =~ s/^>// && ' colspan=2',
+ '>',
$cell eq '_' ? ' ' : $cell
);
}
@@ -275,13 +277,21 @@ sub print {
}
sub legend {
- my @classes = (
+ my $self = shift;
+ my @classes = $self->{style} eq 'univer' ? (
[l5 => 'unicode 1.1'],
[l4 => '20th century'],
[l3 => 'in 6.0 (2010)'],
[l2 => 'recent assignments'],
[l1 => 'proposed'],
[ex => 'irregular'],
+ ) : (
+ [l5 => 'ascii'],
+ [l4 => $self->{style} eq 'di' ? 'digraph' : 'latin1'],
+ [l3 => $self->{style} eq 'di' ? 'proposed' : 'HTML4'],
+ [l2 => 'unicode â¤6.0'],
+ [l1 => 'other unicode'],
+ [ex => 'discouraged'],
);
return (