From d7f0d5ab5464a06c0eff760183900d479dbe6728 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 23 Apr 2017 21:10:36 +0200 Subject: [PATCH] unicode: support legend in common method --- Shiar_Sheet/FormatChar.pm | 10 +++++++++- unicode.plp | 16 ++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Shiar_Sheet/FormatChar.pm b/Shiar_Sheet/FormatChar.pm index 839144f..b2e4d09 100644 --- a/Shiar_Sheet/FormatChar.pm +++ b/Shiar_Sheet/FormatChar.pm @@ -275,13 +275,21 @@ sub print { } sub legend { - my @classes = ( + my $self = shift; + my @classes = $self->{style} eq 'univer' ? ( [l5 => 'unicode 1.1'], [l4 => '20th century'], [l3 => 'in 6.0 (2010)'], [l2 => 'recent assignments'], [l1 => 'proposed'], [ex => 'irregular'], + ) : ( + [l5 => 'ascii'], + [l4 => $self->{style} eq 'di' ? 'digraph' : 'latin1'], + [l3 => $self->{style} eq 'di' ? 'proposed' : 'HTML4'], + [l2 => 'unicode ≤6.0'], + [l1 => 'other unicode'], + [ex => 'discouraged'], ); return ( diff --git a/unicode.plp b/unicode.plp index 0ec6374..245be47 100644 --- a/unicode.plp +++ b/unicode.plp @@ -158,18 +158,10 @@ $glyphs->print(map { } } @config); -:> - -
- -
ascii - <:= $glyphs->{style} eq 'di' ? 'digraph' : 'latin1' :> - <:= $glyphs->{style} eq 'di' ? 'proposed' : 'HTML4' :> - unicode ≤6.0 - other unicode - discouraged -
-
+say "\n"; +say for $glyphs->legend; + +:> -- 2.30.0