W3C home > Mailing lists > Public > www-validator-cvs@w3.org > March 2007

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

From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 29 Mar 2007 12:42:35 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1HWtxb-00085l-Tg@lionel-hutz.w3.org>

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) . "&hellip;";
         $col = "";
       }
       my $explanation;
Received on Thursday, 29 March 2007 12:42:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:56 GMT