validator/httpd/cgi-bin check,1.491,1.492

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv30555

Modified Files:
	check 
Log Message:
(Ironically, see Bug 4420) making sure our source snippet doesn't go beyond 80 chars.



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.491
retrieving revision 1.492
diff -u -d -r1.491 -r1.492
--- check	29 Mar 2007 06:07:39 -0000	1.491
+++ check	29 Mar 2007 12:42:33 -0000	1.492
@@ -1378,14 +1378,14 @@
 
   #
   # Add elipsis at end if necessary.
-  unless ($end   == length $line) {substr $line, -3, 3, '...'};
+  unless ($end   == length $line) {substr $line, -3, 3, '…'};
 
   $col = $col - $start; # New offset is diff from $col to $start.
   $line = substr $line, $start, $end - $start; # Truncate.
 
   #
   # Add elipsis at start if necessary.
-  unless ($start == 0)            {substr $line,  0, 3, '...'};
+  unless ($start == 0)            {substr $line,  0, 3, '…'};
 
   return $line, $col;
 }
@@ -1475,10 +1475,10 @@
         $line = &mark_error($line, $col);
       }
       else {
-        $col = int($File->{Content}->[$err->{line}-1]);
-        $col = 150 if ($col > 150);
+        $col = length($File->{Content}->[$err->{line}-1]);
+        $col = 80 if ($col > 80);
         ($line, $col) = &truncate_line($File->{Content}->[$err->{line}-1], $col);
-        $line = &ent($line);
+        $line = &ent($line) . "…";
         $col = "";
       }
       my $explanation;

Received on Thursday, 29 March 2007 12:42:37 UTC