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/20pre...


From: Patrice Dumas
Subject: texinfo/tp Texinfo/Convert/Plaintext.pm t/20pre...
Date: Fri, 04 Feb 2011 23:45:45 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/02/04 23:45:42

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

Log message:
        Don't modify --- and ``... in preformatted environments.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/20preformatted.t?cvsroot=texinfo&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/preformatted.pl?cvsroot=texinfo&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/preformatted/quote_dash_in_example.pl?cvsroot=texinfo&rev=1.1

Patches:
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- Texinfo/Convert/Plaintext.pm        3 Feb 2011 23:38:02 -0000       1.63
+++ Texinfo/Convert/Plaintext.pm        4 Feb 2011 23:45:33 -0000       1.64
@@ -589,6 +589,8 @@
   my $formatter = {'container' => $container, 'upper_case' => 0,
                    'code' => 0, 'w' => 0,
                    'frenchspacing_stack' => [$self->{'frenchspacing'}]};
+  $formatter->{'preformatted'} = 1
+    if ($type eq 'unfilled');
   return $formatter;
 }
 

Index: t/20preformatted.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/20preformatted.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- t/20preformatted.t  31 Jan 2011 00:37:22 -0000      1.5
+++ t/20preformatted.t  4 Feb 2011 23:45:37 -0000       1.6
@@ -10,6 +10,13 @@
 after empty line
 @end example
 '],
+['quote_dash_in_example',
+'
address@hidden
+and now -- yes---now and ``so\'\'.
+
address@hidden example
+'],
 ['text_on_command_line',
 '@example text on line
 @end example

Index: t/results/coverage/preformatted.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage/preformatted.pl,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- t/results/coverage/preformatted.pl  30 Jan 2011 17:00:49 -0000      1.28
+++ t/results/coverage/preformatted.pl  4 Feb 2011 23:45:38 -0000       1.29
@@ -246,7 +246,7 @@
 
 
 $result_converted{'plaintext'}->{'preformatted'} = '
-     e-xample  some
+     e--xample  some
 
         text
 

Index: t/results/preformatted/quote_dash_in_example.pl
===================================================================
RCS file: t/results/preformatted/quote_dash_in_example.pl
diff -N t/results/preformatted/quote_dash_in_example.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/preformatted/quote_dash_in_example.pl     4 Feb 2011 23:45:40 
-0000       1.1
@@ -0,0 +1,81 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
+   %result_indices %result_sectioning %result_nodes %result_menus
+   %result_floats %result_converted %result_converted_errors);
+
+$result_trees{'quote_dash_in_example'} = {
+  'contents' => [
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'cmdname' => 'example',
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line_after_command'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'and now -- yes---now and ``so\'\'.
+'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'empty_line'
+            }
+          ],
+          'parent' => {},
+          'type' => 'preformatted'
+        }
+      ],
+      'parent' => {}
+    },
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line_after_command'
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'quote_dash_in_example'}{'contents'}[0]{'parent'} = 
$result_trees{'quote_dash_in_example'};
+$result_trees{'quote_dash_in_example'}{'contents'}[1]{'contents'}[0]{'parent'} 
= $result_trees{'quote_dash_in_example'}{'contents'}[1];
+$result_trees{'quote_dash_in_example'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'parent'}
 = $result_trees{'quote_dash_in_example'}{'contents'}[1]{'contents'}[1];
+$result_trees{'quote_dash_in_example'}{'contents'}[1]{'contents'}[1]{'contents'}[1]{'parent'}
 = $result_trees{'quote_dash_in_example'}{'contents'}[1]{'contents'}[1];
+$result_trees{'quote_dash_in_example'}{'contents'}[1]{'contents'}[1]{'parent'} 
= $result_trees{'quote_dash_in_example'}{'contents'}[1];
+$result_trees{'quote_dash_in_example'}{'contents'}[1]{'parent'} = 
$result_trees{'quote_dash_in_example'};
+$result_trees{'quote_dash_in_example'}{'contents'}[2]{'parent'} = 
$result_trees{'quote_dash_in_example'};
+
+$result_texis{'quote_dash_in_example'} = '
address@hidden
+and now -- yes---now and ``so\'\'.
+
address@hidden example
+';
+
+
+$result_texts{'quote_dash_in_example'} = '
+and now -- yes---now and ``so\'\'.
+
+';
+
+$result_errors{'quote_dash_in_example'} = [];
+
+
+
+$result_converted{'plaintext'}->{'quote_dash_in_example'} = '
+     and now -- yes---now and ``so\'\'.
+
+';
+
+1;



reply via email to

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