index: bump version to 1.7
[sheet.git] / digraphs.plp
index 718915dab4ed935c213ddefd96709ebf5bec7d2c..4c45044c97f122ba8c0e3feeb3ba078c42aecb1a 100644 (file)
@@ -3,7 +3,7 @@ use 5.010;  # state
 
 Html({
        title => 'digraph cheat sheet',
-       version => 'v1.0',
+       version => 'v1.1',
        description => [
                "Complete table of digraph characters from RFC-1345.",
        ],
@@ -32,6 +32,13 @@ are available as <a href="/digraphs.vim">ex commands</a>.</p>
 my $di = do 'digraphs.inc.pl'
        or die "Error loading digraphs data: ", $@ // $!;
 
+if (exists $get{v}) {
+       # show characters for inverted mnemonics (vim alternatives)
+       $di->{ substr($_, 1, 1) . substr($_, 0, 1) } ||=
+               [ $di->{$_}->[0], '', 'l0 ex', '', $di->{$_}->[4] ]
+               for grep { ref $di->{$_} } keys %{$di};
+}
+
 my @chars = (
        [qw{! " % ' ( ) * + , - . /}],
        ['0'..'9'], [qw{: ; < = > ?}],
@@ -116,7 +123,19 @@ for my $c1group (@chars) {
 print "</table>\n";
 print '<hr>' if exists $get{split};
 }
+
+if (exists $get{xorg}) {
 :>
+<div class="legend">
+       <table class="glyphs"><tr>
+       <td class="X l5">matching RFC-1345
+       <td class="X l3">matching proposal
+       <td class="X l2">unique to Xorg
+       <td class="X l1">conflict
+       <td class="X l0 ex">duplicate
+       </table>
+</div>
+<: } else { :>
 <div class="legend">
        <table class="glyphs"><tr>
        <td class="X Cc">control
@@ -149,3 +168,4 @@ print '<hr>' if exists $get{split};
        </table>
 </div>
 
+<: }