You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

234 lines
9.7 KiB

diff -up texinfo-5.1/tp/t/converters_tests.t.orig texinfo-5.1/tp/t/converters_tests.t
--- texinfo-5.1/tp/t/converters_tests.t.orig 2013-02-19 23:25:47.000000000 +0100
+++ texinfo-5.1/tp/t/converters_tests.t 2017-10-02 14:57:40.692452831 +0200
@@ -707,6 +707,11 @@ explanation
in para
@image{f--ile,,,a very long alt argument that could span more than one line who knows}.
'],
+['enumerate_above_ten',
+'@enumerate 14
+@item a
+@end enumerate
+'],
['footnote_no_number',
'@node Top
diff -up texinfo-5.1/tp/Texinfo/Common.pm.orig texinfo-5.1/tp/Texinfo/Common.pm
--- texinfo-5.1/tp/Texinfo/Common.pm.orig 2013-02-25 22:20:23.000000000 +0100
+++ texinfo-5.1/tp/Texinfo/Common.pm 2017-10-02 14:57:40.689452828 +0200
@@ -1382,7 +1382,7 @@ sub enumerate_item_representation($$)
my $specification = shift;
my $number = shift;
- if ($specification =~ /^[0-9]$/) {
+ if ($specification =~ /^[0-9]+$/) {
return $specification + $number -1;
}
diff -up texinfo-5.1/tp/Texinfo/Parser.pm.orig texinfo-5.1/tp/Texinfo/Parser.pm
--- texinfo-5.1/tp/Texinfo/Parser.pm.orig 2013-03-05 02:11:42.000000000 +0100
+++ texinfo-5.1/tp/Texinfo/Parser.pm 2017-10-02 14:57:40.691452829 +0200
@@ -2973,7 +2973,7 @@ sub _end_line($$$)
$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 \@%s"),
$current->{'cmdname'});
diff -up texinfo-5.1/tp/t/results/converters_tests/enumerate_above_ten.pl.orig texinfo-5.1/tp/t/results/converters_tests/enumerate_above_ten.pl
--- texinfo-5.1/tp/t/results/converters_tests/enumerate_above_ten.pl.orig 2017-10-02 14:57:40.691452829 +0200
+++ texinfo-5.1/tp/t/results/converters_tests/enumerate_above_ten.pl 2017-10-02 14:57:40.691452829 +0200
@@ -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
+@item a
+@end 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;