formatchar: highlight by unicode range if no digraphs
[sheet.git] / unicode.plp
index f506fb59165df582096e3fbced9d105457adf9a6..71499530bf12c15f9e5233d1b31314247012a36f 100644 (file)
@@ -28,8 +28,12 @@ i^k or i^vu respectively in <a href="/vi">Vim</a>.
 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;
+}
 if (exists $get{q}) {
-       $glyphs->{unicode}--;
+       $glyphs->{unicode} = -1;
        $glyphs->{digraph}--;
 }
 
@@ -207,8 +211,8 @@ $verbose ? (
 <div class="legend">
        <table class="glyphs"><tr>
        <td class="X di-a">ascii
-       <td class="X di-d">digraph
-       <td class="X di-prop">proposed
+       <td class="X di-d"><:= $glyphs->{digraph} ? 'digraph' : 'latin1' :>
+       <td class="X di-prop"><:= $glyphs->{digraph} ? 'proposed' : 'BMP' :>
        <td class="X di-b">other unicode
        <td class="X di-rare">discouraged
        </table>