|
@@ -86,17 +86,22 @@ sub gen_diff_colors($$) {
|
|
|
my $html_diff;
|
|
|
open my $fh, '>>', \$html_diff or die "Can't open variable: $!";
|
|
|
|
|
|
- print $fh "<!DOCTYPE html><html><div id=\"content\"><pre id=\"blob\">";
|
|
|
+ #print $fh "<!DOCTYPE html><html><div id=\"content\"><pre id=\"blob\">";
|
|
|
+ print $fh "<!DOCTYPE html><html><div id=\"content\"><pre>";
|
|
|
my $line_counter = 1;
|
|
|
foreach my $line ( split("\n", $raw_diff) ) {
|
|
|
if ( $line =~ m/^\+/ ) {
|
|
|
- print $fh "<a href=\"\#l$line_counter\" class=\"line\" id=\"l$line_counter\">$line_counter</a><font color=\"green\">\t$line</font></br>";
|
|
|
+ print $fh "<font color=\"green\"><xmp>$line</xmp></font>";
|
|
|
} elsif ( $line =~ m/^\-/ ) {
|
|
|
- print $fh "<a href=\"\#l$line_counter\" class=\"line\" id=\"l$line_counter\">$line_counter</a><font color=\"red\">\t$line</font></br>";
|
|
|
+ print $fh "<font color=\"red\"><xmp>$line</xmp></font>";
|
|
|
} elsif ( $line =~ m/^@@/ ) {
|
|
|
- print $fh "<a href=\"\#l$line_counter\" class=\"line\" id=\"l$line_counter\">$line_counter</a><font color=\"blue\">\t$line</font></br>";
|
|
|
+ print $fh "<font color=\"blue\"><xmp>$line</xmp></font>";
|
|
|
+ } elsif ( $line =~ m/^diff/ ) {
|
|
|
+ print $fh "<font color=\"purple\"><xmp>$line</xmp></font>";
|
|
|
+ } elsif ( $line =~ m/^commit/ ) {
|
|
|
+ print $fh "<font color=\"purple\"><b><xmp>$line</xmp></b></font>";
|
|
|
} else {
|
|
|
- print $fh "<a href=\"\#l$line_counter\" class=\"line\" id=\"l$line_counter\">$line_counter</a>\t$line</br>";
|
|
|
+ print $fh "<xmp>$line</xmp>";
|
|
|
}
|
|
|
$line_counter++;
|
|
|
}
|