validator/httpd/cgi-bin check,1.501,1.502

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

Modified Files:
	check 
Log Message:
fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=4472
(outline for non xml-based languages) 
by making heading-selection regexp case insensitive.



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.501
retrieving revision 1.502
diff -u -d -r1.501 -r1.502
--- check	18 Apr 2007 06:32:52 -0000	1.501
+++ check	19 Apr 2007 07:28:43 -0000	1.502
@@ -2241,7 +2241,7 @@
 sub W3C::Validator::SAXHandler::start_element
 {
   my ($self, $element) = @_;
-  if ($element->{Name} =~ /^h([1-6])$/) {
+  if ($element->{Name} =~ /^h([1-6])$/i) {
 
     $self->{_file}->{heading_outline} = $self->{_file}->{heading_outline} . "    " x int($1) . "[". $element->{Name}."] ";
     $self->{am_in_heading} = 1;
@@ -2322,7 +2322,7 @@
 sub W3C::Validator::SAXHandler::end_element
 {
   my ($self, $element) = @_;
-  if ($element->{Name} =~ /^h[1-6]$/) {
+  if ($element->{Name} =~ /^h[1-6]$/i) {
     $self->{_file}->{heading_outline} = $self->{_file}->{heading_outline} . "\n";
     $self->{am_in_heading} = 0;
   }

Received on Thursday, 19 April 2007 07:28:55 UTC