W3C home > Mailing lists > Public > www-validator-cvs@w3.org > May 2004

validator/httpd/cgi-bin check,1.305.2.110,1.305.2.111

From: Ville Skytta <ville@hutz.w3.org>
Date: Sat, 08 May 2004 17:10:44 +0000
To: www-validator-cvs@w3.org
Message-Id: <20040508171044.97CD64B09@hutz.w3.org>

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

Modified Files:
      Tag: validator-0_6_0-branch
	check 
Log Message:
Link from error line numbers to source only if we're showing the source.

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.305.2.110
retrieving revision 1.305.2.111
diff -u -d -r1.305.2.110 -r1.305.2.111
--- check	7 May 2004 18:11:02 -0000	1.305.2.110
+++ check	8 May 2004 17:10:41 -0000	1.305.2.111
@@ -1904,8 +1904,12 @@
 
       my $msg = &ent($err->{msg}); # Entity encode error message.
 
+      # Link from line numbers to source iff we're showing it.
+      my $linenr = $File->{'Opt'}->{'Show Source'} ?
+        qq(<a href="#line-$err->{line}">$err->{line}</a>) : $err->{line};
+
       print ' ' x 8; # Indent markup...
-      print qq(<li><p><em>Line <a href="#line-$err->{line}">$err->{line}</a>, column $err->{char}</em>: );
+      print qq(<li><p><em>Line $linenr, column $err->{char}</em>: );
       print qq{<span class="msg">$msg</span></p>};
       print qq(<p><code class="input">$line</code></p>);
 
Received on Saturday, 8 May 2004 13:11:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:02:06 UTC