texinfo-commits
[Top][All Lists]
Advanced

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

[5357] * tp/Texinfo/Parser.pm: accept matching braces in ignored


From: Patrice Dumas
Subject: [5357] * tp/Texinfo/Parser.pm: accept matching braces in ignored
Date: Sat, 07 Sep 2013 17:18:00 +0000

Revision: 5357
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5357
Author:   pertusus
Date:     2013-09-07 17:17:59 +0000 (Sat, 07 Sep 2013)
Log Message:
-----------
        * tp/Texinfo/Parser.pm: accept matching braces in ignored 
        @inline* commands.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Parser.pm
    trunk/tp/t/results/converters_tests/inline.pl

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2013-09-07 16:43:13 UTC (rev 5356)
+++ trunk/ChangeLog     2013-09-07 17:17:59 UTC (rev 5357)
@@ -2,6 +2,8 @@
 
        * tp/texi2any.pl: handle plaintext as other formats to set 
        expanded formats.
+       * tp/Texinfo/Parser.pm: accept matching braces in ignored 
+       @inline* commands.
 
 2013-09-06  Patrice Dumas  <address@hidden>
 

Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm  2013-09-07 16:43:13 UTC (rev 5356)
+++ trunk/tp/Texinfo/Parser.pm  2013-09-07 17:17:59 UTC (rev 5357)
@@ -4988,10 +4988,12 @@
           } elsif ($current->{'type'} 
                    and $current->{'type'} eq 'rawpreformatted') {
             push @{$current->{'contents'}}, {'text' => '{' };
-          # matching braces accepted in a rawpreformatted or math
+          # matching braces accepted in a rawpreformatted or math or ignored
+          # code
           } elsif ($self->{'context_stack'}->[-1] eq 'math'
                    or $self->{'context_stack'}->[-1] eq 'rawpreformatted'
-                   or $self->{'context_stack'}->[-1] eq 'inlineraw') {
+                   or $self->{'context_stack'}->[-1] eq 'inlineraw'
+                   or $self->_ignore_global_commands()) {
             push @{$current->{'contents'}},
                  { 'type' => 'bracketed', 'contents' => [],
                    'parent' => $current, 'line_nr' => $line_nr };

Modified: trunk/tp/t/results/converters_tests/inline.pl
===================================================================
--- trunk/tp/t/results/converters_tests/inline.pl       2013-09-07 16:43:13 UTC 
(rev 5356)
+++ trunk/tp/t/results/converters_tests/inline.pl       2013-09-07 17:17:59 UTC 
(rev 5357)
@@ -259,29 +259,55 @@
                 },
                 {
                   'parent' => {},
-                  'text' => '$\\underlinea < b '
+                  'text' => '$\\underline'
                 },
                 {
-                  'args' => [
+                  'contents' => [
                     {
-                      'contents' => [
+                      'parent' => {},
+                      'text' => 'a < b '
+                    },
+                    {
+                      'args' => [
                         {
+                          'contents' => [
+                            {
+                              'parent' => {},
+                              'text' => 'tex \\hbox'
+                            },
+                            {
+                              'contents' => [
+                                {
+                                  'parent' => {},
+                                  'text' => ' code '
+                                }
+                              ],
+                              'line_nr' => {
+                                'file_name' => '',
+                                'line_nr' => 6,
+                                'macro' => ''
+                              },
+                              'parent' => {},
+                              'type' => 'bracketed'
+                            }
+                          ],
                           'parent' => {},
-                          'text' => 'tex \\hbox code '
+                          'type' => 'brace_command_arg'
                         }
                       ],
-                      'parent' => {},
-                      'type' => 'brace_command_arg'
+                      'cmdname' => 'code',
+                      'contents' => [],
+                      'line_nr' => {},
+                      'parent' => {}
                     }
                   ],
-                  'cmdname' => 'code',
-                  'contents' => [],
-                  'line_nr' => {
-                    'file_name' => '',
-                    'line_nr' => 6,
-                    'macro' => ''
-                  },
-                  'parent' => {}
+                  'line_nr' => {},
+                  'parent' => {},
+                  'type' => 'bracketed'
+                },
+                {
+                  'parent' => {},
+                  'text' => '$ ``'
                 }
               ],
               'parent' => {},
@@ -297,6 +323,7 @@
               ],
               [
                 {},
+                {},
                 {}
               ]
             ],
@@ -311,7 +338,7 @@
         },
         {
           'parent' => {},
-          'text' => '$ ``
+          'text' => '
 '
         }
       ],
@@ -701,14 +728,22 @@
 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[0];
 $result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[0]{'parent'} = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8];
 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[1]{'parent'}
 = $result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1];
-$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'args'}[0];
-$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2];
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[0]{'parent'}
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2];
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'args'}[0];
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[1]{'contents'}[0]{'parent'}
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'args'}[0];
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1];
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'line_nr'}
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[1]{'line_nr'};
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'parent'}
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2];
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'line_nr'}
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[1]{'line_nr'};
 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'parent'}
 = $result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1];
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[3]{'parent'}
 = $result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1];
 $result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'parent'} = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8];
 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'extra'}{'brace_command_contents'}[0][0]
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[0]{'contents'}[0];
 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'extra'}{'brace_command_contents'}[1][0]
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[1];
 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'extra'}{'brace_command_contents'}[1][1]
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2];
-$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'line_nr'} = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'line_nr'};
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'extra'}{'brace_command_contents'}[1][2]
 = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[3];
+$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'line_nr'} = 
$result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'args'}[1]{'contents'}[2]{'contents'}[1]{'args'}[0]{'contents'}[1]{'line_nr'};
 $result_trees{'inline'}{'contents'}[1]{'contents'}[8]{'parent'} = 
$result_trees{'inline'}{'contents'}[1];
 $result_trees{'inline'}{'contents'}[1]{'contents'}[9]{'parent'} = 
$result_trees{'inline'}{'contents'}[1];
 $result_trees{'inline'}{'contents'}[1]{'parent'} = $result_trees{'inline'};
@@ -774,7 +809,7 @@
 @inlinefmt{plaintext, plaintext ``}, 
 @inlinefmt{xml, <para>xml</para> ``},
 @inlinefmt{docbook, <emphasis>docbook</emphasis> ``}, 
address@hidden, $\\underlinea < b @code{tex \\hbox code }}$ ``
address@hidden, $\\underline{a < b @code{tex \\hbox{ code }}}$ ``}
 
 
 @inlineraw{html, raw <blink>html</blink> ``}, 
@@ -790,9 +825,9 @@
 , 
 ,
 , 
-$ "
 
 
+
 , 
 , 
 ,
@@ -800,48 +835,11 @@
 
 ';
 
-$result_errors{'inline'} = [
-  {
-    'error_line' => ':6: misplaced {
-',
-    'file_name' => '',
-    'line_nr' => 6,
-    'macro' => '',
-    'text' => 'misplaced {',
-    'type' => 'error'
-  },
-  {
-    'error_line' => ':6: misplaced {
-',
-    'file_name' => '',
-    'line_nr' => 6,
-    'macro' => '',
-    'text' => 'misplaced {',
-    'type' => 'error'
-  },
-  {
-    'error_line' => ':6: misplaced }
-',
-    'file_name' => '',
-    'line_nr' => 6,
-    'macro' => '',
-    'text' => 'misplaced }',
-    'type' => 'error'
-  },
-  {
-    'error_line' => ':6: misplaced }
-',
-    'file_name' => '',
-    'line_nr' => 6,
-    'macro' => '',
-    'text' => 'misplaced }',
-    'type' => 'error'
-  }
-];
+$result_errors{'inline'} = [];
 
 
 
-$result_converted{'plaintext'}->{'inline'} = ', plaintext ", , , $ "
+$result_converted{'plaintext'}->{'inline'} = ', plaintext ", , ,
 
    , raw plaintext ``, , ,
 ';
@@ -852,7 +850,7 @@
 , 
 ,
 , 
-$ &ldquo;
+
 </p>
 
 <p>raw <blink>html</blink> ``, 
@@ -868,7 +866,7 @@
 <inlinefmt><inlinefmtformat>plaintext</inlinefmtformat><inlinefmtcontent 
spaces=" ">plaintext &textldquo;</inlinefmtcontent></inlinefmt>, 
 &lt;para&gt;xml&lt;/para&gt; &textldquo;,
 <inlinefmt><inlinefmtformat>docbook</inlinefmtformat><inlinefmtcontent 
spaces=" ">&lt;emphasis&gt;docbook&lt;/emphasis&gt; 
&textldquo;</inlinefmtcontent></inlinefmt>, 
-<inlinefmt><inlinefmtformat>tex</inlinefmtformat><inlinefmtcontent spaces=" 
">$\\underlinea &lt; b <code>tex \\hbox code 
</code></inlinefmtcontent></inlinefmt>$ &textldquo;
+<inlinefmt><inlinefmtformat>tex</inlinefmtformat><inlinefmtcontent spaces=" 
">$\\underline{a &lt; b <code>tex \\hbox{ code }</code>}$ 
&textldquo;</inlinefmtcontent></inlinefmt>
 </para>
 
 <para><inlineraw><inlinerawformat>html</inlinerawformat><inlinerawcontent 
spaces=" ">raw &lt;blink&gt;html&lt;/blink&gt; 
&textldquo;</inlinerawcontent></inlineraw>, 
@@ -884,7 +882,7 @@
 , 
 ,
 &lt;emphasis&gt;docbook&lt;/emphasis&gt; &#8220;, 
-$ &#8220;
+
 </para>
 
 <para>, 




reply via email to

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