texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp t/results/preformatted/text_on_comma...


From: Patrice Dumas
Subject: texinfo/tp t/results/preformatted/text_on_comma...
Date: Sun, 04 Sep 2011 13:26:23 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/09/04 13:26:23

Modified files:
        tp/t/results/preformatted: text_on_command_line.pl 
        tp/Texinfo/Convert: HTML.pm 

Log message:
        Avoid block commands output with empty content.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/preformatted/text_on_command_line.pl?cvsroot=texinfo&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.144&r2=1.145

Patches:
Index: t/results/preformatted/text_on_command_line.pl
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/t/results/preformatted/text_on_command_line.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- t/results/preformatted/text_on_command_line.pl      13 Aug 2011 15:33:11 
-0000      1.10
+++ t/results/preformatted/text_on_command_line.pl      4 Sep 2011 13:26:23 
-0000       1.11
@@ -518,10 +518,6 @@
 <pre class="example">in example
 </pre></div>
 
-<div class="example">
-<div class="example">
-</div>
-</div>
 ';
 
 1;

Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -b -r1.144 -r1.145
--- Texinfo/Convert/HTML.pm     3 Sep 2011 22:40:55 -0000       1.144
+++ Texinfo/Convert/HTML.pm     4 Sep 2011 13:26:23 -0000       1.145
@@ -2161,6 +2161,7 @@
   my $command = shift;
   my $content = shift;
 
+  if ($content ne '') {
   if ($self->get_conf('COMPLEX_FORMAT_IN_TABLE')) {
     if ($indented_preformatted_commands{$cmdname}) {
       return '<table><tr><td>&nbsp;</td><td>'.$content."</td></tr></table>\n";
@@ -2170,6 +2171,9 @@
   } else {
     return $self->attribute_class('div', 
$cmdname).">\n".$content.'</div>'."\n";
   }
+  } else {
+    return '';
+  }
 }
 
 foreach my $preformatted_command (keys(%preformatted_commands)) {
@@ -2561,7 +2565,11 @@
   my $command = shift;
   my $content = shift;
 
+  if ($content ne '') {
   return "<ol>\n" . $content . "</ol>\n";
+  } else {
+    return '';
+  }
 }
 
 $default_commands_conversion{'enumerate'} = \&_convert_enumerate_command;
@@ -2589,7 +2597,11 @@
   my $command = shift;
   my $content = shift;
 
+  if ($content ne '') {
   return "<dl compact=\"compact\">\n" . $content . "</dl>\n";
+  } else {
+    return '';
+  }
 }
 $default_commands_conversion{'table'} = \&_convert_xtable_command;
 $default_commands_conversion{'ftable'} = \&_convert_xtable_command;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]