+ push @class, 'l1'; # basic unicode
+ }
+ }
+
+ my $anno = '';
+ for (@{ $self->{anno} }) {
+ if ($_ eq 'html') {
+ require HTML::Entities;
+ if (my $_ = $HTML::Entities::char2entity{$cell}) {
+ $anno = sprintf(' <small class="digraph">%s</small>', EscapeHTML($_));
+ last;
+ }
+ }
+ elsif ($_ eq 'xml') {
+ require HTML::Entities;
+ $anno = sprintf(' <small class="digraph">%s</small>',
+ sprintf "&#%d;", ord($cell)
+ );
+ last;
+ }
+ elsif ($_ eq 'di') {
+ if (defined $mnem and length $mnem) {
+ $anno = sprintf(' <small class="digraph">%s</small>', EscapeHTML($mnem));
+ last;
+ }
+ }
+ else {
+ if ($_ eq 'hex' or $cell =~ /^[^a-zA-Z]$/) {
+ $anno = sprintf(' <small class="%s">%04X</small>', 'value', ord $cell);
+ last;
+ }