texinfo-commits
[Top][All Lists]
Advanced

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

[5270] * tp/Common.pm (enumerate_item_representation), Texinfo/


From: Patrice Dumas
Subject: [5270] * tp/Common.pm (enumerate_item_representation), Texinfo/ Parser.pm:
Date: Mon, 29 Jul 2013 20:02:25 +0000

Revision: 5270
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5270
Author:   pertusus
Date:     2013-07-29 20:02:23 +0000 (Mon, 29 Jul 2013)
Log Message:
-----------
        * tp/Common.pm (enumerate_item_representation), Texinfo/Parser.pm:
        handle correctly @enumerate specification greater than 10.  Report
        from Dmitry Shachnev.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Common.pm
    trunk/tp/Texinfo/Parser.pm
    trunk/tp/t/converters_tests.t

Added Paths:
-----------
    trunk/tp/t/results/converters_tests/enumerate_above_ten.pl

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2013-06-29 16:11:15 UTC (rev 5269)
+++ trunk/ChangeLog     2013-07-29 20:02:23 UTC (rev 5270)
@@ -1,3 +1,9 @@
+2013-07-29  Patrice Dumas  <address@hidden>
+
+       * tp/Common.pm (enumerate_item_representation), Texinfo/Parser.pm:
+       handle correctly @enumerate specification greater than 10.  Report
+       from Dmitry Shachnev.
+
 2013-06-28  Karl Berry  <address@hidden>
 
        * contrib/perldoc-all/GNUmakefile (texi_pod_doc_incl): remove X<...>

Modified: trunk/tp/Texinfo/Common.pm
===================================================================
--- trunk/tp/Texinfo/Common.pm  2013-06-29 16:11:15 UTC (rev 5269)
+++ trunk/tp/Texinfo/Common.pm  2013-07-29 20:02:23 UTC (rev 5270)
@@ -1382,7 +1382,7 @@
   my $specification = shift;
   my $number = shift;
 
-  if ($specification =~ /^[0-9]$/) {
+  if ($specification =~ /^[0-9]+$/) {
     return $specification + $number -1;
   }
 

Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm  2013-06-29 16:11:15 UTC (rev 5269)
+++ trunk/tp/Texinfo/Parser.pm  2013-07-29 20:02:23 UTC (rev 5270)
@@ -2973,7 +2973,7 @@
                         $current->{'cmdname'});
           }
           my $arg = 
$current->{'extra'}->{'block_command_line_contents'}->[0]->[0];
-          if (!defined($arg->{'text'}) or $arg->{'text'} !~ /^[[:alnum:]]$/) {
+          if (!defined($arg->{'text'}) or $arg->{'text'} !~ 
/^(([[:digit:]]+)|([[:alpha:]]+))$/) {
             $self->_command_error($current, $line_nr, 
                         $self->__("bad argument to address@hidden"),
                         $current->{'cmdname'});

Modified: trunk/tp/t/converters_tests.t
===================================================================
--- trunk/tp/t/converters_tests.t       2013-06-29 16:11:15 UTC (rev 5269)
+++ trunk/tp/t/converters_tests.t       2013-07-29 20:02:23 UTC (rev 5270)
@@ -707,6 +707,11 @@
 in para
 @image{f--ile,,,a very long alt argument that could span more than one line 
who knows}.
 '],
+['enumerate_above_ten',
+'@enumerate 14
address@hidden a
address@hidden enumerate
+'],
 ['footnote_no_number',
 '@node Top
 

Added: trunk/tp/t/results/converters_tests/enumerate_above_ten.pl
===================================================================
--- trunk/tp/t/results/converters_tests/enumerate_above_ten.pl                  
        (rev 0)
+++ trunk/tp/t/results/converters_tests/enumerate_above_ten.pl  2013-07-29 
20:02:23 UTC (rev 5270)
@@ -0,0 +1,191 @@
+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{'enumerate_above_ten'} = {
+  'contents' => [
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'extra' => {
+                'command' => {}
+              },
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => '14'
+            },
+            {
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'space_at_end_block_command'
+            }
+          ],
+          'parent' => {},
+          'type' => 'block_line_arg'
+        }
+      ],
+      'cmdname' => 'enumerate',
+      'contents' => [
+        {
+          'cmdname' => 'item',
+          'contents' => [
+            {
+              'extra' => {
+                'command' => {}
+              },
+              'parent' => {},
+              'text' => ' ',
+              'type' => 'empty_spaces_after_command'
+            },
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'a
+'
+                }
+              ],
+              'parent' => {},
+              'type' => 'paragraph'
+            }
+          ],
+          'extra' => {
+            'item_number' => 1,
+            'spaces_after_command' => {}
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 2,
+            'macro' => ''
+          },
+          'parent' => {}
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'extra' => {
+                    'command' => {}
+                  },
+                  'parent' => {},
+                  'text' => ' ',
+                  'type' => 'empty_spaces_after_command'
+                },
+                {
+                  'parent' => {},
+                  'text' => 'enumerate'
+                },
+                {
+                  'parent' => {},
+                  'text' => '
+',
+                  'type' => 'spaces_at_end'
+                }
+              ],
+              'parent' => {},
+              'type' => 'misc_line_arg'
+            }
+          ],
+          'cmdname' => 'end',
+          'extra' => {
+            'command' => {},
+            'command_argument' => 'enumerate',
+            'spaces_after_command' => {},
+            'text_arg' => 'enumerate'
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 3,
+            'macro' => ''
+          },
+          'parent' => {}
+        }
+      ],
+      'extra' => {
+        'block_command_line_contents' => [
+          [
+            {}
+          ]
+        ],
+        'end_command' => {},
+        'enumerate_specification' => '14',
+        'spaces_after_command' => {}
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      },
+      'parent' => {}
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'enumerate_above_ten'}{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'enumerate_above_ten'}{'contents'}[0]{'args'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'enumerate_above_ten'}{'contents'}[0]{'args'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'enumerate_above_ten'}{'contents'}[0]{'args'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'args'}[0]{'parent'} = 
$result_trees{'enumerate_above_ten'}{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'parent'}
 = 
$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0]{'contents'}[1];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0]{'extra'}{'spaces_after_command'}
 = 
$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0]{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[0]{'parent'} = 
$result_trees{'enumerate_above_ten'}{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
 = 
$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'}
 = $result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'extra'}{'command'}
 = $result_trees{'enumerate_above_ten'}{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'extra'}{'spaces_after_command'}
 = 
$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1]{'parent'} = 
$result_trees{'enumerate_above_ten'}{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'extra'}{'block_command_line_contents'}[0][0]
 = 
$result_trees{'enumerate_above_ten'}{'contents'}[0]{'args'}[0]{'contents'}[1];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'extra'}{'end_command'} = 
$result_trees{'enumerate_above_ten'}{'contents'}[0]{'contents'}[1];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'extra'}{'spaces_after_command'}
 = 
$result_trees{'enumerate_above_ten'}{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'enumerate_above_ten'}{'contents'}[0]{'parent'} = 
$result_trees{'enumerate_above_ten'};
+
+$result_texis{'enumerate_above_ten'} = '@enumerate 14
address@hidden a
address@hidden enumerate
+';
+
+
+$result_texts{'enumerate_above_ten'} = '14. a
+';
+
+$result_errors{'enumerate_above_ten'} = [];
+
+
+
+$result_converted{'plaintext'}->{'enumerate_above_ten'} = '  14. a
+';
+
+
+$result_converted{'html_text'}->{'enumerate_above_ten'} = '<ol>
+<li> a
+</li></ol>
+';
+
+
+$result_converted{'xml'}->{'enumerate_above_ten'} = '<enumerate first="14" 
spaces=" " endspaces=" "><enumeratefirst>14</enumeratefirst>
+<listitem spaces=" "><para>a
+</para></listitem></enumerate>
+';
+
+
+$result_converted{'docbook'}->{'enumerate_above_ten'} = '<orderedlist 
numeration="arabic"><listitem><para>a
+</para></listitem></orderedlist>';
+
+1;




reply via email to

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