termcol: monospaced terminal samples
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 8 Dec 2010 02:01:25 +0000 (03:01 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 15 Dec 2010 21:40:44 +0000 (22:40 +0100)
Hexadecimal values as <code> to force equal widths.

termcol.plp

index 90f8a7c..5493c8a 100644 (file)
@@ -35,7 +35,7 @@ sub colcell {
                "background:$css; color:$inverse; padding:0 1ex",
                $name,
        );
-       $out .= sprintf '<td style="%s">%s', "background:$_; color:$css", $minhex
+       $out .= sprintf '<td style="%s"><code>%s</code>', "background:$_; color:$css", $minhex
                for @$sample;
        return "$out\n";
 }