git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
termcol: include and mark duplicate colours in ppu
[sheet.git]
/
termcol.plp
diff --git
a/termcol.plp
b/termcol.plp
index bd9fd538f8117860593facfafecb8d588bf6625c..26a5c70e4343d71a343484ee7a91f3a1e6c30624 100644
(file)
--- a/
termcol.plp
+++ b/
termcol.plp
@@
-46,8
+46,6
@@
use POSIX qw( ceil );
my $palettes = do 'termcol.inc.pl';
die "Cannot open palette data: $_\n" for $@ || $! || ();
my $palettes = do 'termcol.inc.pl';
die "Cannot open palette data: $_\n" for $@ || $! || ();
-my $more = do 'termcol-xcolor.inc.pl' || {};
-$palettes = {%$palettes, %$more};
sub colcell {
my $name = shift // return "<td>\n";
sub colcell {
my $name = shift // return "<td>\n";
@@
-108,6
+106,12
@@
sub coltable {
if (ref $info eq 'ARRAY') {
coltable($_) for @{$info};
if (ref $info eq 'ARRAY') {
coltable($_) for @{$info};
+ return;
+ }
+
+ if (ref $info eq 'CODE') {
+ coltable($_) for $info->($palettes);
+ return;
}
ref $info eq 'HASH' or return;
}
ref $info eq 'HASH' or return;