git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f247875
)
termcol: named function to parse table data
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 23 Oct 2016 04:02:19 +0000
(06:02 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 22 Mar 2017 21:28:04 +0000
(22:28 +0100)
Prepare for recursive includes.
termcol.plp
patch
|
blob
|
history
diff --git
a/termcol.plp
b/termcol.plp
index 7e408e602e28288dfa1bae3f54e8559dc237e38c..0000143f7e6f79d027ebb61db23761d25ba6fa67 100644
(file)
--- 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</%1$s>',
$info->{href} ? 'a' : 'span',
@@
-250,6
+252,7
@@
sub coltable_hsv {
return $out;
}
+coltable($_) for @termlist;
:></div>
<hr>