/[swish]/trunk/html/FormatResult.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/html/FormatResult.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 106 by dpavlin, Tue Sep 14 19:29:50 2004 UTC revision 107 by dpavlin, Sat Jul 9 13:14:25 2005 UTC
# Line 114  sub highlite_words { Line 114  sub highlite_words {
114          foreach my $w (@words) {          foreach my $w (@words) {
115                  if ($w =~ m/ARRAY/) {                  if ($w =~ m/ARRAY/) {
116                          foreach my $ww (sort { length($b) <=> length($a) } @{$w}) {                          foreach my $ww (sort { length($b) <=> length($a) } @{$w}) {
117                                  $$snip_ref =~ s,(\b\Q$ww\E),<span style="background: $colors[$i]; color:black;">$1</span>,gsi;                                  $$snip_ref =~ s,(\b\Q$ww\E\w*),<span style="background: $colors[$i]; color:black;">$1</span>,gsi;
118                          }                          }
119                  } else {                  } else {
120                          $$snip_ref =~ s,(\b\Q$w\E),<span style="background: $colors[$i]; color:black;">$1</span>,gsi;                          $$snip_ref =~ s,(\b\Q$w\E\w*),<span style="background: $colors[$i]; color:black;">$1</span>,gsi;
121                  }                  }
122                  $i++;                  $i++;
123                  $i = 0 if ($i > $#colors);                  $i = 0 if ($i > $#colors);

Legend:
Removed from v.106  
changed lines
  Added in v.107

  ViewVC Help
Powered by ViewVC 1.1.26