use Data::Dump 'pp';
use PLP::Functions 'EscapeHTML';
-our $VERSION = '1.06';
+our $VERSION = '1.07';
our $uc = do 'unicode-char.inc.pl';
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)";
+ my $title = sprintf 'U+%04X%s', $codepoint, !!$name && " ($name)";
- $cell = "<span>$cell</span>" if $class =~ /\bZs\b/;
+ $cell = "<span>$cell</span>" if $class and $class =~ /\bZs\b/;
$cell = ' ' if $cell eq '';
- return ($cell, EscapeHTML($title), "X $class", $mnem, $html);
+ return ($cell, EscapeHTML($title), !!$class && "X $class", $mnem, $entity);
}
sub glyphs_html {
}
if ($self->{style} eq 'di') {
- if ($mnem =~ /…/) {
+ if ($mnem and $mnem =~ /…/) {
# incomplete representation, usually partial
}
elsif ($class =~ /\bu-di\b/) {