texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp Texinfo/Convert/Plaintext.pm t/resul...


From: Patrice Dumas
Subject: texinfo/tp Texinfo/Convert/Plaintext.pm t/resul...
Date: Sat, 20 Nov 2010 22:56:04 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        10/11/20 22:56:04

Modified files:
        tp/Texinfo/Convert: Plaintext.pm 
        tp/t/results/coverage: preformatted.pl 

Log message:
        Keep end of lines in preformatted.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/preformatted.pl?cvsroot=texinfo&r1=1.22&r2=1.23

Patches:
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- Texinfo/Convert/Plaintext.pm        20 Nov 2010 22:43:35 -0000      1.7
+++ Texinfo/Convert/Plaintext.pm        20 Nov 2010 22:56:04 -0000      1.8
@@ -736,9 +736,10 @@
     push @{$self->{'current_contents'}}, address@hidden;
     while (@contents) {
       my $content = shift @contents;
-      if (!$paragraph and $content->{'type'} 
+      if ($content->{'type'} 
           and $content->{'type'} eq 'empty_line') {
-        $result .= "\n" if (!$self->{'empty_lines_count'});
+        $result .= "\n" if (!$self->{'empty_lines_count'} 
+                            or $self->{'context'}->[-1] eq 'preformatted');
         $self->{'empty_lines_count'}++;
       } else {
         $result .= $self->convert($content);

Index: t/results/coverage/preformatted.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage/preformatted.pl,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- t/results/coverage/preformatted.pl  20 Nov 2010 17:05:41 -0000      1.22
+++ t/results/coverage/preformatted.pl  20 Nov 2010 22:56:04 -0000      1.23
@@ -232,8 +232,10 @@
 
 $result_converted{'plaintext'}->{'preformatted'} = '
      e-xample  some  
+
    text
 item in table in format
+
 in table in format
 ';
 



reply via email to

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