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 {
}
}
else {
- if ($_ eq 'hex' or $cell =~ /^[^a-zA-Z]$/) {
- $anno = sprintf(' <small class="%s">%04X</small>', 'value', ord $cell);
+ if ($_ eq 'hex' or $input =~ /^[^a-zA-Z]$/) {
+ $anno = sprintf(' <small class="%s">%04X</small>', 'value', ord $input);
last;
}
}
my @colheads;
while ($digraphs->[0] !~ /^\./) {
my $cell = shift @$digraphs or last;
- push @colheads, sprintf(
- '<%s%s>%s',
+ if ($cell eq '>') {
+ push @colheads, '<tr>';
+ next;
+ }
+ push @colheads, join('',
+ '<',
$cell =~ s/^-// ? 'td' : 'th',
- $cell =~ s/:(.*)// ? qq{ title="$1"} : '',
+ $cell =~ s/:(.*)// && qq{ title="$1"},
+ $cell =~ s/^(>+)// && ' colspan='.(length($1) + 1),
+ '>',
$cell eq '_' ? ' ' : $cell
);
}