diff options
author | ot <ot@localhost> | 2007-07-12 15:46:52 +0000 |
---|---|---|
committer | ot <ot@localhost> | 2007-07-12 15:46:52 +0000 |
commit | 666faa3566f715f8c74101e4a0719482ec768797 (patch) | |
tree | 1d184cbd9dd76e8e2df9905ccee79532371013cc | |
parent | 3858e5ce9fa2646e888f56305f690c144b97a93e (diff) | |
download | markup-validator-666faa3566f715f8c74101e4a0719482ec768797.zip markup-validator-666faa3566f715f8c74101e4a0719482ec768797.tar.gz markup-validator-666faa3566f715f8c74101e4a0719482ec768797.tar.bz2 |
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.
-rwxr-xr-x | httpd/cgi-bin/check | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index e15bb42..ffb5cae 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -14,7 +14,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.538 2007-07-11 12:57:32 ot Exp $ +# $Id: check,v 1.539 2007-07-12 15:46:52 ot Exp $ # # Disable buffering on STDOUT! @@ -183,7 +183,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.538 $; + $VERSION = q$Revision: 1.539 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -1467,7 +1467,10 @@ sub truncate_line { # # 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; } |