formatchar: annotation option for html entities
[sheet.git] / unicode.plp
index d7e5e01544596da7675b0c9cdbdb766736be03fe..09200305cf17c37c932554e2aab772045eb2c755 100644 (file)
@@ -31,12 +31,13 @@ use Shiar_Sheet::FormatChar;
 my $glyphs = Shiar_Sheet::FormatChar->new;
 
 if (exists $get{di}) {
-       $glyphs->{digraph} = defined $get{di} ? ! !$get{di} : 1;
-       $glyphs->{unicode} = 1;
+       $glyphs->{anno} = [ (!defined $get{di} || $get{di}) && 'di', 'hex' ];
 }
 if (exists $get{q}) {
-       $glyphs->{unicode} = -1;
-       $glyphs->{digraph}--;
+       $glyphs->{anno} = [];
+}
+if (exists $get{html}) {
+       $glyphs->{anno} = ['html', 'xml'];
 }
 
 our $verbose = exists $get{v};
@@ -136,8 +137,8 @@ $glyphs->print(map {
 <div class="legend">
        <table class="glyphs"><tr>
        <td class="X l4">ascii
-       <td class="X l3"><:= $glyphs->{digraph} ? 'digraph' : 'latin1' :>
-       <td class="X l2"><:= $glyphs->{digraph} ? 'proposed' : 'BMP' :>
+       <td class="X l3"><:= $glyphs->{style} eq 'di' ? 'digraph' : 'latin1' :>
+       <td class="X l2"><:= $glyphs->{style} eq 'di' ? 'proposed' : 'BMP' :>
        <td class="X l1">other unicode
        <td class="X ex">discouraged
        </table>