From afb59e8b70e543ead8f26ab4701403404e4b15ea Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 22 Mar 2017 19:51:12 +0100 Subject: [PATCH] digraphs: prefer xorg path over parameter Major subpage selector similar to other pages. --- digraphs.plp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/digraphs.plp b/digraphs.plp index 12f76c8..e5003b6 100644 --- a/digraphs.plp +++ b/digraphs.plp @@ -1,6 +1,8 @@ <(common.inc.plp)><: use 5.010; # state +my $mode = ($ENV{PATH_INFO} // '') eq '/xorg' || exists $get{xorg}; + Html({ title => 'digraph cheat sheet', version => '1.1', @@ -49,7 +51,7 @@ my @chars2 = (['_'], @chars); # trailing character (extended set) my @columns = !exists $get{split} ? \@chars2 : ([@chars2[0, 1, 3, 4, 6]], [@chars2[2, 5, 7]]); -if (exists $get{xorg}) { +if ($mode) { my $xorg = do 'data/digraphs-xorg.inc.pl' or die "Error loading Xorg data: ", $@ // $!; $_ = [ord $_] for values %{$xorg}; @@ -124,7 +126,7 @@ print "\n"; print '
' if exists $get{split}; } -if (exists $get{xorg}) { +if ($mode) { :>
-- 2.30.0