texinfo-commits
[Top][All Lists]
Advanced

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

[5220] * tp/Texinfo/Parser.pm (_close_current): close correctly


From: Patrice Dumas
Subject: [5220] * tp/Texinfo/Parser.pm (_close_current): close correctly stacks when
Date: Tue, 05 Mar 2013 01:11:44 +0000

Revision: 5220
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5220
Author:   pertusus
Date:     2013-03-05 01:11:42 +0000 (Tue, 05 Mar 2013)
Log Message:
-----------
        * tp/Texinfo/Parser.pm (_close_current): close correctly stacks when
        closing $format_raw_commands.  Report from Mat Booth.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Parser.pm
    trunk/tp/t/57invalid_nestings.t

Added Paths:
-----------
    trunk/tp/t/results/invalid_nestings/raw_block_on_line.pl

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2013-03-03 00:22:25 UTC (rev 5219)
+++ trunk/ChangeLog     2013-03-05 01:11:42 UTC (rev 5220)
@@ -1,3 +1,8 @@
+2013-03-05  Patrice Dumas  <address@hidden>
+
+       * tp/Texinfo/Parser.pm (_close_current): close correctly stacks when
+       closing $format_raw_commands.  Report from Mat Booth.
+
 2013-03-02  Karl Berry  <address@hidden>
 
        * pretest 5.0.90.

Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm  2013-03-03 00:22:25 UTC (rev 5219)
+++ trunk/tp/Texinfo/Parser.pm  2013-03-05 01:11:42 UTC (rev 5220)
@@ -1666,9 +1666,13 @@
           my $conditional = pop @{$current->{'parent'}->{'contents'}};
         }
       }
-      my $context = pop @{$self->{'context_stack'}} if
-         ($preformatted_commands{$current->{'cmdname'}}
-           or $menu_commands{$current->{'cmdname'}});
+      if ($preformatted_commands{$current->{'cmdname'}}
+          or $menu_commands{$current->{'cmdname'}}
+          or $format_raw_commands{$current->{'cmdname'}}) {
+        my $context = pop @{$self->{'context_stack'}};
+        pop @{$self->{'raw_formats_stack'}} 
+          if ($format_raw_commands{$current->{'cmdname'}});
+      }
       pop @{$self->{'regions_stack'}} 
          if ($region_commands{$current->{'cmdname'}});
       $current = $current->{'parent'};

Modified: trunk/tp/t/57invalid_nestings.t
===================================================================
--- trunk/tp/t/57invalid_nestings.t     2013-03-03 00:22:25 UTC (rev 5219)
+++ trunk/tp/t/57invalid_nestings.t     2013-03-05 01:11:42 UTC (rev 5220)
@@ -28,6 +28,9 @@
 @deffnx address@hidden anchorx}} @titlefont{in titlefontx} 
@footnote{footnotex} @exdent exdentx
 @end deffn
 '],
+['raw_block_on_line',
+'@cindex @tex
+'],
 ['ignored_text',
 '@node before ignore @ifinfo
 in ifinfo

Added: trunk/tp/t/results/invalid_nestings/raw_block_on_line.pl
===================================================================
--- trunk/tp/t/results/invalid_nestings/raw_block_on_line.pl                    
        (rev 0)
+++ trunk/tp/t/results/invalid_nestings/raw_block_on_line.pl    2013-03-05 
01:11:42 UTC (rev 5220)
@@ -0,0 +1,90 @@
+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_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'raw_block_on_line'} = {
+  'contents' => [
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'extra' => {
+                'command' => {}
+              },
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'cmdname' => 'tex',
+              'contents' => [
+                {
+                  'extra' => {
+                    'command' => {}
+                  },
+                  'parent' => {},
+                  'text' => '
+',
+                  'type' => 'empty_line_after_command'
+                }
+              ],
+              'extra' => {
+                'spaces_after_command' => {}
+              },
+              'line_nr' => {
+                'file_name' => '',
+                'line_nr' => 1,
+                'macro' => ''
+              },
+              'parent' => {}
+            }
+          ],
+          'parent' => {},
+          'type' => 'misc_line_arg'
+        }
+      ],
+      'cmdname' => 'cindex',
+      'extra' => {
+        'spaces_after_command' => {}
+      },
+      'line_nr' => {},
+      'parent' => {}
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'raw_block_on_line'}{'contents'}[0];
+$result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0];
+$result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[1];
+$result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'contents'}[0]{'parent'}
 = $result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[1];
+$result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'extra'}{'spaces_after_command'}
 = 
$result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'contents'}[0];
+$result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0];
+$result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'parent'} = 
$result_trees{'raw_block_on_line'}{'contents'}[0];
+$result_trees{'raw_block_on_line'}{'contents'}[0]{'extra'}{'spaces_after_command'}
 = $result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'raw_block_on_line'}{'contents'}[0]{'line_nr'} = 
$result_trees{'raw_block_on_line'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'line_nr'};
+$result_trees{'raw_block_on_line'}{'contents'}[0]{'parent'} = 
$result_trees{'raw_block_on_line'};
+
+$result_texis{'raw_block_on_line'} = '@cindex @tex
+';
+
+
+$result_texts{'raw_block_on_line'} = '';
+
+$result_errors{'raw_block_on_line'} = [
+  {
+    'error_line' => ':1: no matching address@hidden tex\'
+',
+    'file_name' => '',
+    'line_nr' => 1,
+    'macro' => '',
+    'text' => 'no matching address@hidden tex\'',
+    'type' => 'error'
+  }
+];
+
+
+1;




reply via email to

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