From bcdcb872044a3146c38f3c17bb601130f170aff4 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 23 Oct 2016 06:02:19 +0200 Subject: [PATCH] termcol: named function to parse table data Prepare for recursive includes. --- termcol.plp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/termcol.plp b/termcol.plp index 7e408e6..0000143 100644 --- a/termcol.plp +++ b/termcol.plp @@ -106,9 +106,11 @@ sub img_egapal { } || $@; } -for my $term (@termlist) { +sub coltable { + my ($term) = @_; my $info = $palettes->{$term}; ref $info eq 'HASH' or next; + my $caption = $info->{name} // $term; $caption = sprintf('<%s %s>%s', $info->{href} ? 'a' : 'span', @@ -250,6 +252,7 @@ sub coltable_hsv { return $out; } +coltable($_) for @termlist; :>
-- 2.30.0