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

validator/httpd/cgi-bin check,1.538,1.539

From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 12 Jul 2007 15:46:55 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1I90sZ-0002tR-QP@lionel-hutz.w3.org>

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

Modified Files:
	check 
Log Message:
fixing a bug with error location highlighting when the beginning of the line
is replaced with the ellipsis. The wrong location (2 chars off) was pointed to.

Bug spotted and patched by Brett Bieber.



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.538
retrieving revision 1.539
diff -u -d -r1.538 -r1.539
--- check	11 Jul 2007 12:57:32 -0000	1.538
+++ check	12 Jul 2007 15:46:52 -0000	1.539
@@ -1467,7 +1467,10 @@
 
   #
   # Add elipsis at start if necessary.
-  unless ($start == 0)            {substr $line,  0, 3, '…'};
+  unless ($start == 0)  {
+      substr $line,  0, 3, '…';
+      $col = $col - 2;
+    };
 
   return $line, $col;
 }
Received on Thursday, 12 July 2007 15:46:58 GMT

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