my ($self, $char) = @_;
my $codepoint = ord $char;
my $info = $self->glyph_info($codepoint);
- my ($class, $name, $mnem, $html, $string) = @$info;
+ my ($class, $name, $mnem, $entity, $string) = @$info;
my $cell = EscapeHTML($string || $char);
my $title = sprintf 'U+%04X%s', $codepoint, $name && " ($name)";
$cell = "<span>$cell</span>" if $class =~ /\bZs\b/;
$cell = ' ' if $cell eq '';
- return ($cell, EscapeHTML($title), "X $class", $mnem, $html);
+ return ($cell, EscapeHTML($title), "X $class", $mnem, $entity);
}
sub glyphs_html {
}
}
- return sprintf('<td%s%s%s>%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,
);
$colspan++;
next;
}
+ elsif ($cell eq '>-') {
+ $rows[-1] .= '<th>';
+ next;
+ }
+ elsif ($cell =~ m/^</) {
+ $rows[-1] .= '<td>'.$cell;
+ next;
+ }
$rows[-1] .= $self->cell($cell,
- $colspan > 1 && qq{ colspan="$colspan"},
+ $colspan > 1 && qq{colspan="$colspan"},
);
$colspan = 1;