X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/b4e3ab4c99479faa0b03df7b45e8c69d301e09b8..f49c3d7ee38d51e8056652cb3ee378a7b6d4768e:/Shiar_Sheet/FormatChar.pm diff --git a/Shiar_Sheet/FormatChar.pm b/Shiar_Sheet/FormatChar.pm index 0e59678..a3f4cc9 100644 --- a/Shiar_Sheet/FormatChar.pm +++ b/Shiar_Sheet/FormatChar.pm @@ -80,7 +80,7 @@ sub cell { $input =~ s/^\\//; # escaped char ($cell, $title, my $class, $mnem, $entity) = $self->glyphs_html($input); - if ($self->{style} = 'di') { + if ($self->{style} eq 'di') { if ($class =~ /\bu-di\b/) { push @class, ('l3', 'u-di'); # standard digraph } @@ -88,6 +88,11 @@ sub cell { 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) { @@ -177,7 +182,8 @@ sub table { if ($cell =~ s/^>//) { # header cell text follows $cell =~ s/_/ /g; # underscores may be used instead of whitespace (for qw//ability) - $rows[-1] .= ''.($cell || ' '); + my $class = $cell =~ s/^-// && ' class="ex"'; + $rows[-1] .= "".($cell || ' '); } next; }