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

Bug#249801: www.debian.org: tidy reports trimming empty <dd> for vote pages



Package: www.debian.org
Severity: normal
Tags: patch

Hi,

looking at
   http://people.debian.org/~alfie/tidy/fr
tidy reports some warning about empty <dd> tags, here is a patch that
should solve this problem for vote pages, where in fact it is the only
case where there is nothing between the two variable
$elemfoot$elemrealfoot in the wml code, the new variable $elememptyfoot
should be used each time the foot is empty, and this appears to be the
case only for the vote section.

BTW, I'm not sure the <br /> is very usefull, elinks renders the page in
the same way without it, but that's my only webbrowser, so I haven't
really checked this.

please check the patch before using it


Regards


Nicolas Bertolissio


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.4
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro

-- 
Index: recent_list.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/recent_list.wml,v
retrieving revision 1.119
diff -u -r1.119 recent_list.wml
--- recent_list.wml	30 Apr 2004 08:32:09 -0000	1.119
+++ recent_list.wml	19 May 2004 09:35:48 -0000
@@ -78,7 +78,7 @@
 # 3) News/2002/index.wml
 # get_recent_list ('.', '0', '$(ENGLISHDIR)/News/2002', '', '\d+\w*')
 
-my ($listhead, $listfoot, $elemhead, $elemdate, $elemfoot, $elemrealfoot);
+my ($listhead, $listfoot, $elemhead, $elemdate, $elemfoot, $elememptyfoot, $elemrealfoot);
 my $is_events = 0;
 my $is_by_date = 0;
 
@@ -123,12 +123,14 @@
 	$listfoot = '</ol>';
 	$elemhead = '<li>';
 	$elemfoot = '- ';
+	$elememptyfoot = '</li>';
 	$elemrealfoot = '</li>';
     } elsif ($format =~ bullet) {
 	$listhead = '<ul>';
 	$listfoot = '</ul>';
 	$elemhead = '<li>';
 	$elemfoot = '- ';
+	$elememptyfoot = '</li>';
 	$elemrealfoot = '</li>';
     } elsif ($format =~ list) {
 	$listhead = '<dl>';
@@ -136,6 +138,7 @@
 	$listfoot = '</dl>';
 	$elemhead = '<dt>';
 	$elemfoot = '</dt><dd>';
+	$elememptyfoot = '</dt>';
 	$elemrealfoot = '</dd>';
     } elsif ($format =~ table) {
 	$listhead = '<table>';
@@ -143,12 +146,14 @@
 	$elemhead = '<tr><td>';
 	$elemdate = '</td><td>';
 	$elemfoot = '';
+	$elememptyfoot = '&nbsp;</td></tr>';
 	$elemrealfoot = '</td></tr>';
     } else {
 	$listhead = '';
 	$listfoot = '';
 	$elemhead = '';
 	$elemfoot = '- ';
+	$elememptyfoot = '';
 	$elemrealfoot = '';
     }
 </protect>
@@ -403,7 +408,7 @@
 	    elsif ( $status eq "F" ) { $str1 .= "<finished/>"; }
 	    elsif ( $status eq "W" ) { $str1 .= "<withdrawn/>"; }
 	    else { $str1 .= "$status"; }
-	    $str1 .= "<br />$elemfoot$elemrealfoot\n";
+	    $str1 .= "<br />$elememptyfoot\n";
 	}
 
 	if (!$is_by_date || ($hdate eq "")) {

Attachment: signature.asc
Description: Digital signature


Reply to: