texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp Texinfo/Common.pm Texinfo/Parser.pm ...


From: Patrice Dumas
Subject: texinfo/tp Texinfo/Common.pm Texinfo/Parser.pm ...
Date: Sat, 19 Mar 2011 00:04:29 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/03/19 00:04:29

Modified files:
        tp/Texinfo     : Common.pm Parser.pm 
        tp/t           : info_tests.t plaintext_tests.t 
Added files:
        tp/t/results/info_tests: image_and_punctuation.pl 
        tp/t/results/plaintext_tests: insert_copying_and_paragraph.pl 
                                      insert_copying_inline_and_paragraph.pl 

Log message:
        Allow for @instercopying to be treated like a @macro and not as a 
Texinfo 
        tree.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.223&r2=1.224
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/info_tests.t?cvsroot=texinfo&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/plaintext_tests.t?cvsroot=texinfo&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/image_and_punctuation.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/plaintext_tests/insert_copying_and_paragraph.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/plaintext_tests/insert_copying_inline_and_paragraph.pl?cvsroot=texinfo&rev=1.1

Patches:
Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- Texinfo/Common.pm   15 Mar 2011 22:27:48 -0000      1.21
+++ Texinfo/Common.pm   19 Mar 2011 00:04:27 -0000      1.22
@@ -422,6 +422,25 @@
 
 $block_commands{'float'} = 2;
 
+foreach my $block_command (keys(%block_commands)) {
+  $close_paragraph_commands{$block_command} = 1
+     unless ($block_commands{$block_command} eq 'raw' or
+             $block_commands{$block_command} eq 'conditional');
+}
+
+$close_paragraph_commands{'verbatim'} = 1;
+
+foreach my $close_paragraph_command ('titlefont', 'insertcopying', 'sp',
+  'verbatiminclude', 'page', 'item', 'itemx', 'tab', 'headitem',
+  'printindex', 'listoffloats', 'center', 'dircategory', 'contents',
+  'shortcontents', 'summarycontents', 'caption', 'shortcaption') {
+  $close_paragraph_commands{$close_paragraph_command} = 1;
+}
+
+foreach my $close_paragraph_command (keys(%def_commands)) {
+  $close_paragraph_commands{$close_paragraph_command} = 1;
+}
+
 our %item_container_commands;
 foreach my $item_container_command ('itemize', 'enumerate') {
   $item_container_commands{$item_container_command} = 1;

Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.223
retrieving revision 1.224
diff -u -b -r1.223 -r1.224
--- Texinfo/Parser.pm   17 Mar 2011 21:01:02 -0000      1.223
+++ Texinfo/Parser.pm   19 Mar 2011 00:04:27 -0000      1.224
@@ -219,6 +219,7 @@
   'gettext' => sub {return $_[0];},
   'expanded_formats' => [],
   'include_directories' => [ '.' ],
+  'INLINE_INSERTCOPYING' => 0,
   # this is the initial context.  It is put at the bottom of the 
   # 'context_stack'
   'context' => '_root',
@@ -284,6 +285,10 @@
 #                         is also in that structure.
 # misc_commands           the same than %misc_commands below, but with index
 #                         entry commands dynamically added
+# close_paragraph_commands      same than %close_paragraph_command, but with
+#                               insertcopying removed if INLINE_INSERTCOPYING
+# close_preformatted_commands   same than %close_preformatted_command, but 
with
+#                               insertcopying removed if INLINE_INSERTCOPYING
 # no_paragraph_commands   the same than %default_no_paragraph_commands
 #                         below, with index
 #                         entry commands dynamically added
@@ -471,27 +476,12 @@
 foreach my $block_command (keys(%block_commands)) {
   $begin_line_commands{$block_command} = 1;
   $default_no_paragraph_commands{$block_command} = 1;
-  $close_paragraph_commands{$block_command} = 1 
-     unless ($block_commands{$block_command} eq 'raw' or 
-             $block_commands{$block_command} eq 'conditional');
   $block_arg_commands{$block_command} = 1 
     if ($block_command eq 'multitable' 
         or $def_commands{$block_command}
         or ($block_commands{$block_command} 
             and $block_commands{$block_command} =~ /^\d+$/));
 }
-$close_paragraph_commands{'verbatim'} = 1;
-
-foreach my $close_paragraph_command ('titlefont', 'insertcopying', 'sp',
-  'verbatiminclude', 'page', 'item', 'itemx', 'tab', 'headitem', 
-  'printindex', 'listoffloats', 'center', 'dircategory', 'contents',
-  'shortcontents', 'summarycontents', 'caption', 'shortcaption') {
-  $close_paragraph_commands{$close_paragraph_command} = 1;
-}
-
-foreach my $close_paragraph_command (keys(%def_commands)) {
-  $close_paragraph_commands{$close_paragraph_command} = 1;
-}
 
 my %close_preformatted_commands = %close_paragraph_commands;
 foreach my $no_close_preformatted('sp') {
@@ -661,6 +651,12 @@
   $parser->{'no_paragraph_commands'} = { %default_no_paragraph_commands };
   $parser->{'index_names'} = _deep_copy (\%index_names);
   $parser->{'command_index_prefix'} = {%command_index_prefix};
+  $parser->{'close_paragraph_commands'} = {%close_paragraph_commands};
+  $parser->{'close_preformatted_commands'} = {%close_preformatted_commands};
+  if ($parser->{'INLINE_INSERTCOPYING'}) {
+    delete $parser->{'close_paragraph_commands'}->{'insercopying'};
+    delete $parser->{'close_preformatted_commands'}->{'insercopying'};
+  }
   # a hash is simply concatenated.  It should be like %index_names.
   if (ref($parser->{'indices'}) eq 'HASH') {
     %{$parser->{'index_names'}} = (%{$parser->{'index_names'}}, 
@@ -991,7 +987,7 @@
               and ($current->{'contents'}->[$index]->{'type'} eq 'empty_line'
                    or $current->{'contents'}->[$index]->{'type'} eq 
'paragraph'))
             and !($current->{'contents'}->[$index]->{'cmdname'}
-                  and 
$close_paragraph_commands{$current->{'contents'}->[$index]->{'cmdname'}})) {
+                  and 
$self->{'close_paragraph_commands'}->{$current->{'contents'}->[$index]->{'cmdname'}}))
 {
         if ($current->{'contents'}->[$index]->{'cmdname'}
           and ($current->{'contents'}->[$index]->{'cmdname'} eq 'indent'
               or $current->{'contents'}->[$index]->{'cmdname'} eq 'noindent')) 
{
@@ -2444,11 +2440,33 @@
         my $closed_command;
         ($closed_command, $current)
           = _close_commands($self, $current, $line_nr, $end_command);
+        my $inline_copying;
         if ($closed_command) {
           $misc_cmd->{'extra'}->{'command'} = $closed_command;
           $closed_command->{'extra'}->{'end_command'} = $misc_cmd;
           $self->_close_command_cleanup($closed_command);
           $end->{'parent'} = $closed_command;
+
+          # register @insertcopying as a macro if INLINE_INSERTCOPYING is set.
+          if ($end_command eq 'copying' and $self->{'INLINE_INSERTCOPYING'}) {
+            # remove the end of line following @copying.
+            my @contents = @{$closed_command->{'contents'}};
+            shift @contents if ($contents[0] and $contents[0]->{'type'}
+               and ($contents[0]->{'type'} eq 'empty_line_after_command'
+                    or $contents[0]->{'type'} eq 
'empty_spaces_after_command'));
+            # the macrobody is the @copying content converted to Texinfo.
+            my $body = Texinfo::Convert::Texinfo::convert(
+                         {'contents' => address@hidden);
+            
+            #chomp ($body);
+            $self->{'macros'}->{'insertcopying'} = {
+                    'args' => [{'text' => 'insertcopying', 'type' => 
'macro_name'}],
+                    'cmdname' => 'macro',
+                    'extra' => {'macrobody' => $body}
+            };
+            $inline_copying = 1;
+            print STDERR "INLINE_INSERTCOPYING as macro\n" if 
($self->{'debug'});
+          }
           push @{$closed_command->{'contents'}}, $end;
         }
         $current = $self->_begin_preformatted($current);
@@ -3252,10 +3270,10 @@
           $current = $paragraph if ($paragraph);
         }
 
-        if ($close_paragraph_commands{$command}) {
+        if ($self->{'close_paragraph_commands'}->{$command}) {
           $current = _end_paragraph($self, $current, $line_nr);
         }
-        if ($close_preformatted_commands{$command}) {
+        if ($self->{'close_preformatted_commands'}->{$command}) {
           $current = _end_preformatted($self, $current, $line_nr);
         }
 

Index: t/info_tests.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/info_tests.t,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- t/info_tests.t      16 Mar 2011 23:35:24 -0000      1.27
+++ t/info_tests.t      19 Mar 2011 00:04:28 -0000      1.28
@@ -215,6 +215,23 @@
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBB 
@image{words}
 
 '],
+['image_and_punctuation',
+'@node Top
+
+One space. @image{f--ile}.
+
+Two spaces.  @image{f--ile}.
+
+End line.
address@hidden
+
+One space. @image{words}.
+
+Two spaces.  @image{words}.
+
+End line.
address@hidden
+'],
 [ 'multitable_anchor_and_index_entry',
 '@node Top
 

Index: t/plaintext_tests.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/plaintext_tests.t,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- t/plaintext_tests.t 14 Mar 2011 23:07:33 -0000      1.19
+++ t/plaintext_tests.t 19 Mar 2011 00:04:28 -0000      1.20
@@ -443,6 +443,21 @@
 '],
 );
 
+my $insert_copying_and_paragraph = 
+'@copying
+In copying.
address@hidden copying
+
+Insertcopying
address@hidden
+';
+
+push @test_cases, ['insert_copying_and_paragraph', 
+                    $insert_copying_and_paragraph];
+push @test_cases, ['insert_copying_inline_and_paragraph', 
+                    $insert_copying_and_paragraph, 
+                    {'INLINE_INSERTCOPYING' => 1}];
+
 my $at_commands_glued_text = 'at@@.
 address@hidden
 address@hidden code}code.

Index: t/results/info_tests/image_and_punctuation.pl
===================================================================
RCS file: t/results/info_tests/image_and_punctuation.pl
diff -N t/results/info_tests/image_and_punctuation.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/info_tests/image_and_punctuation.pl       19 Mar 2011 00:04:28 
-0000      1.1
@@ -0,0 +1,509 @@
+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);
+
+use utf8;
+
+$result_trees{'image_and_punctuation'} = {
+  'contents' => [
+    {
+      'contents' => [],
+      'parent' => {},
+      'type' => 'text_root'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => 'Top'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'spaces_at_end'
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'One space. '
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'parent' => {},
+                      'text' => 'f--ile'
+                    }
+                  ],
+                  'parent' => {},
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'image',
+              'contents' => [],
+              'extra' => {
+                'brace_command_contents' => [
+                  [
+                    {}
+                  ]
+                ]
+              },
+              'line_nr' => {
+                'file_name' => '',
+                'line_nr' => 3,
+                'macro' => ''
+              },
+              'parent' => {}
+            },
+            {
+              'parent' => {},
+              'text' => '.
+'
+            }
+          ],
+          'parent' => {},
+          'type' => 'paragraph'
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'Two spaces.  '
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'parent' => {},
+                      'text' => 'f--ile'
+                    }
+                  ],
+                  'parent' => {},
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'image',
+              'contents' => [],
+              'extra' => {
+                'brace_command_contents' => [
+                  [
+                    {}
+                  ]
+                ]
+              },
+              'line_nr' => {
+                'file_name' => '',
+                'line_nr' => 5,
+                'macro' => ''
+              },
+              'parent' => {}
+            },
+            {
+              'parent' => {},
+              'text' => '.
+'
+            }
+          ],
+          'parent' => {},
+          'type' => 'paragraph'
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'End line.
+'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'parent' => {},
+                      'text' => 'f--ile'
+                    }
+                  ],
+                  'parent' => {},
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'image',
+              'contents' => [],
+              'extra' => {
+                'brace_command_contents' => [
+                  [
+                    {}
+                  ]
+                ]
+              },
+              'line_nr' => {
+                'file_name' => '',
+                'line_nr' => 8,
+                'macro' => ''
+              },
+              'parent' => {}
+            },
+            {
+              'parent' => {},
+              'text' => '.
+'
+            }
+          ],
+          'parent' => {},
+          'type' => 'paragraph'
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'One space. '
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'parent' => {},
+                      'text' => 'words'
+                    }
+                  ],
+                  'parent' => {},
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'image',
+              'contents' => [],
+              'extra' => {
+                'brace_command_contents' => [
+                  [
+                    {}
+                  ]
+                ]
+              },
+              'line_nr' => {
+                'file_name' => '',
+                'line_nr' => 10,
+                'macro' => ''
+              },
+              'parent' => {}
+            },
+            {
+              'parent' => {},
+              'text' => '.
+'
+            }
+          ],
+          'parent' => {},
+          'type' => 'paragraph'
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'Two spaces.  '
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'parent' => {},
+                      'text' => 'words'
+                    }
+                  ],
+                  'parent' => {},
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'image',
+              'contents' => [],
+              'extra' => {
+                'brace_command_contents' => [
+                  [
+                    {}
+                  ]
+                ]
+              },
+              'line_nr' => {
+                'file_name' => '',
+                'line_nr' => 12,
+                'macro' => ''
+              },
+              'parent' => {}
+            },
+            {
+              'parent' => {},
+              'text' => '.
+'
+            }
+          ],
+          'parent' => {},
+          'type' => 'paragraph'
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'End line.
+'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'parent' => {},
+                      'text' => 'words'
+                    }
+                  ],
+                  'parent' => {},
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'image',
+              'contents' => [],
+              'extra' => {
+                'brace_command_contents' => [
+                  [
+                    {}
+                  ]
+                ]
+              },
+              'line_nr' => {
+                'file_name' => '',
+                'line_nr' => 15,
+                'macro' => ''
+              },
+              'parent' => {}
+            },
+            {
+              'parent' => {},
+              'text' => '.
+'
+            }
+          ],
+          'parent' => {},
+          'type' => 'paragraph'
+        }
+      ],
+      'extra' => {
+        'node_content' => [
+          {}
+        ],
+        'nodes_manuals' => [
+          {
+            'node_content' => [],
+            'normalized' => 'Top'
+          }
+        ],
+        'normalized' => 'Top'
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      },
+      'parent' => {}
+    }
+  ],
+  'type' => 'document_root'
+};
+$result_trees{'image_and_punctuation'}{'contents'}[0]{'parent'} = 
$result_trees{'image_and_punctuation'};
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'args'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'args'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'args'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'args'}[0]{'parent'} = 
$result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[0]{'parent'} 
= $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1]{'contents'}[0]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1]{'contents'}[1]{'args'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1]{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1]{'contents'}[1]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1]{'contents'}[2]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[1]{'parent'} 
= $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[2]{'parent'} 
= $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3]{'contents'}[0]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3]{'contents'}[1]{'args'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3]{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3]{'contents'}[1]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3]{'contents'}[2]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[3]{'parent'} 
= $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[4]{'parent'} 
= $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5]{'contents'}[0]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5]{'contents'}[1]{'args'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5]{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5]{'contents'}[1]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5]{'contents'}[2]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[5]{'parent'} 
= $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[6]{'parent'} 
= $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7]{'contents'}[0]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7]{'contents'}[1]{'args'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7]{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7]{'contents'}[1]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7]{'contents'}[2]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[7]{'parent'} 
= $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[8]{'parent'} 
= $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9]{'contents'}[0]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9]{'contents'}[1]{'args'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9]{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9]{'contents'}[1]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9]{'contents'}[2]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[9]{'parent'} 
= $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[10]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11]{'contents'}[0]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11]{'contents'}[1]{'args'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11]{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11]{'contents'}[1]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11]{'contents'}[2]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'contents'}[11]{'parent'}
 = $result_trees{'image_and_punctuation'}{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'extra'}{'node_content'}[0]
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}
 = 
$result_trees{'image_and_punctuation'}{'contents'}[1]{'extra'}{'node_content'};
+$result_trees{'image_and_punctuation'}{'contents'}[1]{'parent'} = 
$result_trees{'image_and_punctuation'};
+
+$result_texis{'image_and_punctuation'} = '@node Top
+
+One space. @image{f--ile}.
+
+Two spaces.  @image{f--ile}.
+
+End line.
address@hidden
+
+One space. @image{words}.
+
+Two spaces.  @image{words}.
+
+End line.
address@hidden
+';
+
+
+$result_texts{'image_and_punctuation'} = '
+One space. f--ile.
+
+Two spaces.  f--ile.
+
+End line.
+f--ile.
+
+One space. words.
+
+Two spaces.  words.
+
+End line.
+words.
+';
+
+$result_sectioning{'image_and_punctuation'} = {};
+
+$result_nodes{'image_and_punctuation'} = {
+  'cmdname' => 'node',
+  'extra' => {
+    'normalized' => 'Top'
+  },
+  'node_up' => {
+    'extra' => {
+      'manual_content' => [
+        {
+          'text' => 'dir'
+        }
+      ]
+    }
+  }
+};
+
+$result_menus{'image_and_punctuation'} = {
+  'cmdname' => 'node',
+  'extra' => {
+    'normalized' => 'Top'
+  }
+};
+
+$result_errors{'image_and_punctuation'} = [];
+
+
+
+$result_converted{'info'}->{'image_and_punctuation'} = 'This is , produced by 
makeinfo version 4.13 from .
+
+
+File: ,  Node: Top,  Up: (dir)
+
+One space. [image src="f--ile.png" text="[Image description\\"\\"\\\\.]"].
+
+   Two spaces.  [image src="f--ile.png" text="[Image 
description\\"\\"\\\\.]"].
+
+   End line. [image src="f--ile.png" text="[Image 
description\\"\\"\\\\.]"].
+
+   One space. [This is an image words.].
+
+   Two spaces.  [This is an image words.].
+
+   End line. [This is an image words.].
+
+
+Tag Table:
+Node: Top52
+
+End Tag Table
+';
+
+1;

Index: t/results/plaintext_tests/insert_copying_and_paragraph.pl
===================================================================
RCS file: t/results/plaintext_tests/insert_copying_and_paragraph.pl
diff -N t/results/plaintext_tests/insert_copying_and_paragraph.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/plaintext_tests/insert_copying_and_paragraph.pl   19 Mar 2011 
00:04:28 -0000      1.1
@@ -0,0 +1,146 @@
+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);
+
+use utf8;
+
+$result_trees{'insert_copying_and_paragraph'} = {
+  'contents' => [
+    {
+      'cmdname' => 'copying',
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line_after_command'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'In copying.
+'
+            }
+          ],
+          'parent' => {},
+          'type' => 'paragraph'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => ' ',
+                  'type' => 'empty_spaces_after_command'
+                },
+                {
+                  'parent' => {},
+                  'text' => 'copying'
+                },
+                {
+                  'parent' => {},
+                  'text' => '
+',
+                  'type' => 'spaces_at_end'
+                }
+              ],
+              'parent' => {},
+              'type' => 'misc_line_arg'
+            }
+          ],
+          'cmdname' => 'end',
+          'extra' => {
+            'command' => {},
+            'command_argument' => 'copying',
+            'text_arg' => 'copying'
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 3,
+            'macro' => ''
+          },
+          'parent' => {}
+        }
+      ],
+      'extra' => {
+        'end_command' => {}
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      },
+      'parent' => {}
+    },
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => 'Insertcopying
+'
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    },
+    {
+      'cmdname' => 'insertcopying',
+      'parent' => {}
+    },
+    {
+      'parent' => {},
+      'text' => '
+'
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'insert_copying_and_paragraph'}{'contents'}[0];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[1]{'contents'}[0]{'parent'}
 = $result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[1];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'insert_copying_and_paragraph'}{'contents'}[0];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[2]{'parent'}
 = 
$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'parent'}
 = $result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2]{'extra'}{'command'}
 = $result_trees{'insert_copying_and_paragraph'}{'contents'}[0];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'insert_copying_and_paragraph'}{'contents'}[0];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'extra'}{'end_command'}
 = $result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'contents'}[2];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[0]{'parent'} = 
$result_trees{'insert_copying_and_paragraph'};
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[1]{'parent'} = 
$result_trees{'insert_copying_and_paragraph'};
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[2]{'contents'}[0]{'parent'}
 = $result_trees{'insert_copying_and_paragraph'}{'contents'}[2];
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[2]{'parent'} = 
$result_trees{'insert_copying_and_paragraph'};
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[3]{'parent'} = 
$result_trees{'insert_copying_and_paragraph'};
+$result_trees{'insert_copying_and_paragraph'}{'contents'}[4]{'parent'} = 
$result_trees{'insert_copying_and_paragraph'};
+
+$result_texis{'insert_copying_and_paragraph'} = '@copying
+In copying.
address@hidden copying
+
+Insertcopying
address@hidden
+';
+
+
+$result_texts{'insert_copying_and_paragraph'} = '
+Insertcopying
+
+';
+
+$result_errors{'insert_copying_and_paragraph'} = [];
+
+
+
+$result_converted{'plaintext'}->{'insert_copying_and_paragraph'} = '
+Insertcopying
+   In copying.
+';
+
+1;

Index: t/results/plaintext_tests/insert_copying_inline_and_paragraph.pl
===================================================================
RCS file: t/results/plaintext_tests/insert_copying_inline_and_paragraph.pl
diff -N t/results/plaintext_tests/insert_copying_inline_and_paragraph.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/results/plaintext_tests/insert_copying_inline_and_paragraph.pl    19 Mar 
2011 00:04:28 -0000      1.1
@@ -0,0 +1,140 @@
+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);
+
+use utf8;
+
+$result_trees{'insert_copying_inline_and_paragraph'} = {
+  'contents' => [
+    {
+      'cmdname' => 'copying',
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line_after_command'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'In copying.
+'
+            }
+          ],
+          'parent' => {},
+          'type' => 'paragraph'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => ' ',
+                  'type' => 'empty_spaces_after_command'
+                },
+                {
+                  'parent' => {},
+                  'text' => 'copying'
+                },
+                {
+                  'parent' => {},
+                  'text' => '
+',
+                  'type' => 'spaces_at_end'
+                }
+              ],
+              'parent' => {},
+              'type' => 'misc_line_arg'
+            }
+          ],
+          'cmdname' => 'end',
+          'extra' => {
+            'command' => {},
+            'command_argument' => 'copying',
+            'text_arg' => 'copying'
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 3,
+            'macro' => ''
+          },
+          'parent' => {}
+        }
+      ],
+      'extra' => {
+        'end_command' => {}
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      },
+      'parent' => {}
+    },
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => 'Insertcopying
+'
+        },
+        {
+          'parent' => {},
+          'text' => 'In copying.
+'
+        }
+      ],
+      'parent' => {},
+      'type' => 'paragraph'
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[1]{'contents'}[0]{'parent'}
 = 
$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[1];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[2]{'parent'}
 = 
$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2]{'extra'}{'command'}
 = $result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'extra'}{'end_command'}
 = 
$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'contents'}[2];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[0]{'parent'} 
= $result_trees{'insert_copying_inline_and_paragraph'};
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[1]{'parent'} 
= $result_trees{'insert_copying_inline_and_paragraph'};
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[2]{'contents'}[0]{'parent'}
 = $result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[2];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[2]{'contents'}[1]{'parent'}
 = $result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[2];
+$result_trees{'insert_copying_inline_and_paragraph'}{'contents'}[2]{'parent'} 
= $result_trees{'insert_copying_inline_and_paragraph'};
+
+$result_texis{'insert_copying_inline_and_paragraph'} = '@copying
+In copying.
address@hidden copying
+
+Insertcopying
+In copying.
+';
+
+
+$result_texts{'insert_copying_inline_and_paragraph'} = '
+Insertcopying
+In copying.
+';
+
+$result_errors{'insert_copying_inline_and_paragraph'} = [];
+
+
+
+$result_converted{'plaintext'}->{'insert_copying_inline_and_paragraph'} = '
+Insertcopying In copying.
+';
+
+1;



reply via email to

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