Added support for SPECIAL COLOR.

This commit is contained in:
dfs
2004-08-11 01:55:39 +00:00
parent 7bc3aa52d4
commit da25a18610
+16 -1
View File
@@ -2,7 +2,7 @@
# rem2html
#
# $Id: rem2html,v 1.11 2000-06-26 14:44:17 dfs Exp $
# $Id: rem2html,v 1.12 2004-08-11 01:55:39 dfs Exp $
#
# A script to convert from the output of "remind -p" to Hyper-Text Markup
# Language (HTML), the text format used in WWW documents. By default, it
@@ -201,6 +201,21 @@ sub parse_input {
next if ($red > 255 || $green > 255 || $blue > 255);
$shades[$day] = sprintf(" BGCOLOR=\"#%02X%02X%02X\"",
$red, $green, $blue);
} elsif ($type eq "COLOR") {
my($red, $green, $blue, $stuff);
if ($msg =~ /^\s*(\d+)\s+(\d+)\s+(\d+)\s*(.*)$/) {
$red = $1;
$green = $2;
$blue = $3;
$stuff = $4;
next if ($red > 255 || $green > 255 || $blue > 255);
$days[$day] .=
sprintf("<P><font color=\"#%02x%02x%02x\">",
$red, $green, $blue) .
escape_html($stuff) . "</font></P>";
} else {
next;
}
} elsif ($type eq "*") {
$msg = &escape_html($msg);
$days[$day] .= "<P>$msg</P>";