# -*- perl -*-
#
# This script is eval'ed by the fileViewer.cgi script.
#
# Input is a scalar, $FILE, that contains the file text
#
#
#################################################################
#
# Add colour to html
#
#################################################################
my $bracketStyle="color: blue;" ;
my $firstWordStyle="color: blue; font-weight: bold ;" ;
my $restWordsStyle="color: green;" ;
my $leftbr = "<span style=\"$bracketStyle\"><</span>" ;
my $rightbr = "<span style=\"$bracketStyle\">></span>" ;
$FILE =~ s/<(\/{0,1}\w+)(.*?)>/$leftbr<span style=\"$firstWordStyle\">$1<\/span><span style=\"$restWordsStyle\">$2<\/span>$rightbr/sg ;
$FILE =~ s/<(!.*?)>/$leftbr<span style=\"font-weight: bold;\">$1<\/span>$rightbr/sg ;
$FILE =~ s/&([^;]+);/<span style=\"color: blue ;\"><a title=\"&$1;\">&$1;<\/a><\/span>/sg ;
#
# End
#