[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Closing tags properly in mirror/sponsors



Hi list,

I've been doing Swedish translations of the web pages for a while, and
I've just begun taking a look at getting rid of some weblint warnings.
Some of these turn out to be non-specific to the Swedish pages. For
example, swedish/mirror/sponsors has a lot of non-closed <td> and <tr>
tags and I've traced these to the script
english/mirror/mirror_list.pl, which generates a list which all
translations include. I'm proposing the attached patch, but since I'm
stepping outside of the Swedish translation for the first time, it
would feel a lot better if someone else had a look at it. All comments
are appreciated.

Take care,

Martin
Index: mirror_list.pl
===================================================================
RCS file: /cvs/webwml/webwml/english/mirror/mirror_list.pl,v
retrieving revision 1.129
diff -u -r1.129 mirror_list.pl
--- mirror_list.pl	9 Dec 2007 12:00:24 -0000	1.129
+++ mirror_list.pl	13 Feb 2008 13:10:24 -0000
@@ -685,7 +685,13 @@
 END
       # sites which have Includes don't have to have Sponsor, the included ones
       # have it; and those are looped over separately anyway, so no need to repeat
-      next if (exists $mirror[$id]{includes});
+      if (exists $mirror[$id]{includes}) {
+        print <<END;
+  </td>
+</tr>
+END
+        next;
+      }
       my $numsponsors = @{ $mirror[$id]{sponsor} };
       my $num = 0;
       my ($sponsorname, $sponsorurl);
@@ -702,11 +708,11 @@
         print ",\n" unless ($num >= $numsponsors);
       }
       print "\n";
-    }
-    print <<END;
+      print <<END;
   </td>
 </tr>
 END
+    }
   }
 }
 

Reply to: