[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp Texinfo/Convert/Plaintext.pm t/02cov...
From: |
Patrice Dumas |
Subject: |
texinfo/tp Texinfo/Convert/Plaintext.pm t/02cov... |
Date: |
Sat, 19 Mar 2011 14:53:09 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/03/19 14:53:09
Modified files:
tp/Texinfo/Convert: Plaintext.pm
tp/t : 02coverage.t info_tests.t
tp/t/results/coverage: math.pl
tp/t/results/info_tests: image_and_spaces_formatting.pl
Log message:
Protect characters in math as it was in @code environments.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.118&r2=1.119
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/02coverage.t?cvsroot=texinfo&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/info_tests.t?cvsroot=texinfo&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/math.pl?cvsroot=texinfo&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/image_and_spaces_formatting.pl?cvsroot=texinfo&r1=1.1&r2=1.2
Patches:
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -b -r1.118 -r1.119
--- Texinfo/Convert/Plaintext.pm 19 Mar 2011 10:09:33 -0000 1.118
+++ Texinfo/Convert/Plaintext.pm 19 Mar 2011 14:53:08 -0000 1.119
@@ -1638,7 +1638,8 @@
push @{$self->{'context'}}, 'math';
if ($root->{'args'}) {
$result .= $self->_convert({'type' => 'frenchspacing',
- 'contents' => [$root->{'args'}->[0]]});
+ 'contents' => [{'type' => 'code',
+ 'contents' => [$root->{'args'}->[0]]}]});
}
my $old_context = pop @{$self->{'context'}};
die if ($old_context ne 'math');
Index: t/02coverage.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/02coverage.t,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- t/02coverage.t 19 Mar 2011 10:09:34 -0000 1.44
+++ t/02coverage.t 19 Mar 2011 14:53:08 -0000 1.45
@@ -18,7 +18,7 @@
'],
['math',
'Simple math
address@hidden y}}
address@hidden y}}
Math with @@-command
@address@hidden code} a < b}
Index: t/info_tests.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/info_tests.t,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- t/info_tests.t 19 Mar 2011 00:04:28 -0000 1.28
+++ t/info_tests.t 19 Mar 2011 14:53:08 -0000 1.29
@@ -214,6 +214,8 @@
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBB
@image{words}
+Text. @image{words} @image{words}.
+
'],
['image_and_punctuation',
'@node Top
Index: t/results/coverage/math.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage/math.pl,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- t/results/coverage/math.pl 6 Mar 2011 14:43:59 -0000 1.20
+++ t/results/coverage/math.pl 19 Mar 2011 14:53:08 -0000 1.21
@@ -18,6 +18,10 @@
{
'contents' => [
{
+ 'parent' => {},
+ 'text' => '--'
+ },
+ {
'contents' => [
{
'parent' => {},
@@ -299,11 +303,12 @@
'type' => 'text_root'
};
$result_trees{'math'}{'contents'}[0]{'contents'}[0]{'parent'} =
$result_trees{'math'}{'contents'}[0];
-$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0];
$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'contents'}[0]{'parent'}
=
$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1];
$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0];
-$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2]{'contents'}[0]{'parent'}
=
$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2];
$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3]{'contents'}[0]{'parent'}
=
$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3];
+$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[3]{'parent'}
= $result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0];
$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'} =
$result_trees{'math'}{'contents'}[0]{'contents'}[1];
$result_trees{'math'}{'contents'}[0]{'contents'}[1]{'parent'} =
$result_trees{'math'}{'contents'}[0];
$result_trees{'math'}{'contents'}[0]{'contents'}[2]{'parent'} =
$result_trees{'math'}{'contents'}[0];
@@ -354,7 +359,7 @@
$result_trees{'math'}{'contents'}[7]{'parent'} = $result_trees{'math'};
$result_texis{'math'} = 'Simple math
address@hidden y}}
address@hidden y}}
Math with @@-command
@address@hidden code} a < b}
@@ -369,7 +374,7 @@
$result_texts{'math'} = 'Simple math
-{x^i}\\over{\\tan y}
+--{x^i}\\over{\\tan y}
Math with @-command
math code a < b
@@ -396,7 +401,7 @@
-$result_converted{'plaintext'}->{'math'} = 'Simple math {x^i}\\over{\\tan y}
+$result_converted{'plaintext'}->{'math'} = 'Simple math --{x^i}\\over{\\tan y}
Math with @-command `math code\' a < b
Index: t/results/info_tests/image_and_spaces_formatting.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/info_tests/image_and_spaces_formatting.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- t/results/info_tests/image_and_spaces_formatting.pl 16 Mar 2011 23:35:25
-0000 1.1
+++ t/results/info_tests/image_and_spaces_formatting.pl 19 Mar 2011 14:53:08
-0000 1.2
@@ -804,6 +804,85 @@
'text' => '
',
'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'Text. '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'words'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'image',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 13,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => ' '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'words'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'image',
+ 'contents' => [],
+ 'extra' => {
+ 'brace_command_contents' => [
+ [
+ {}
+ ]
+ ]
+ },
+ 'line_nr' => {},
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '.
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
}
],
'extra' => {
@@ -980,6 +1059,20 @@
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[22]{'contents'}[2]{'parent'}
= $result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[22];
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[22]{'parent'}
= $result_trees{'image_and_spaces_formatting'}{'contents'}[1];
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[23]{'parent'}
= $result_trees{'image_and_spaces_formatting'}{'contents'}[1];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[0]{'parent'}
= $result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[1]{'args'}[0];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[1]{'args'}[0]{'parent'}
=
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[1];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[1]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[1]{'parent'}
= $result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[2]{'parent'}
= $result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[3]{'args'}[0];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[3]{'args'}[0]{'parent'}
=
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[3];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[3]{'extra'}{'brace_command_contents'}[0][0]
=
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[3]{'line_nr'}
=
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[1]{'line_nr'};
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[3]{'parent'}
= $result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'contents'}[4]{'parent'}
= $result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[24]{'parent'}
= $result_trees{'image_and_spaces_formatting'}{'contents'}[1];
+$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'contents'}[25]{'parent'}
= $result_trees{'image_and_spaces_formatting'}{'contents'}[1];
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'extra'}{'node_content'}[0]
=
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'args'}[0]{'contents'}[1];
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}
=
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'extra'}{'node_content'};
$result_trees{'image_and_spaces_formatting'}{'contents'}[1]{'parent'} =
$result_trees{'image_and_spaces_formatting'};
@@ -996,6 +1089,8 @@
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBB
@image{words}
+Text. @image{words} @image{words}.
+
';
@@ -1010,6 +1105,8 @@
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBB words
+Text. words words.
+
';
$result_sectioning{'image_and_spaces_formatting'} = {};
@@ -1056,6 +1153,8 @@
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBB
[This is an image words.]
+ Text. [This is an image words.] [This is an image words.].
+
Tag Table:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp Texinfo/Convert/Plaintext.pm t/02cov...,
Patrice Dumas <=