- if (defined $mnem) {
- push @class, 'di-d'; # digraph
- push @class, 'di-prop' if $class =~ /\bXz\b/; # unofficial
+ if ($self->{style} eq 'di') {
+ if ($class =~ /\bu-di\b/) {
+ push @class, ('l3', 'u-di'); # standard digraph
+ }
+ elsif ($class =~ /\bu-prop\b/) {
+ push @class, ('l2', 'u-prop'); # unofficial
+ }
+ }
+ elsif ($self->{style} eq 'html') {
+ if (defined $entity) {
+ push @class, ('l3', 'u-html');
+ }
+ }
+ else {
+ my $codepoint = ord(substr $input, 0, 1);
+ if ($codepoint <= 0xFF) {
+ push @class, 'l3', 'u-lat1'; # latin1
+ }
+ elsif ($codepoint <= 0xD7FF) {
+ push @class, 'l2', 'u-bmp'; # bmp
+ }