texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp Texinfo/Convert/Plaintext.pm t/info_...


From: Patrice Dumas
Subject: texinfo/tp Texinfo/Convert/Plaintext.pm t/info_...
Date: Sun, 05 Aug 2012 16:44:09 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        12/08/05 16:44:09

Modified files:
        tp/Texinfo/Convert: Plaintext.pm 
        tp/t           : info_tests.t 
        tp/t/results/info_tests: note_in_strong.pl 

Log message:
        Warn for cross ref produces by @strong{note ..} in info only if there 
is 
        a space after note.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.221&r2=1.222
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/info_tests.t?cvsroot=texinfo&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/note_in_strong.pl?cvsroot=texinfo&r1=1.7&r2=1.8

Patches:
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.221
retrieving revision 1.222
diff -u -b -r1.221 -r1.222
--- Texinfo/Convert/Plaintext.pm        5 Aug 2012 14:34:13 -0000       1.221
+++ Texinfo/Convert/Plaintext.pm        5 Aug 2012 16:44:08 -0000       1.222
@@ -1608,7 +1608,7 @@
         if ($root->{'cmdname'} eq 'strong' 
              and scalar (@{$root->{'args'}->[0]->{'contents'}})
              and $root->{'args'}->[0]->{'contents'}->[0]->{'text'}
-             and $root->{'args'}->[0]->{'contents'}->[0]->{'text'} =~ 
/^Note\b/i
+             and $root->{'args'}->[0]->{'contents'}->[0]->{'text'} =~ 
/^Note\s/i
              and $self->{'output_format'}
              and $self->{'output_format'} eq 'info') {
           $self->line_warn($self->__("address@hidden produces a spurious 
cross-reference in Info; reword to avoid that"), $root->{'line_nr'});

Index: t/info_tests.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/info_tests.t,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- t/info_tests.t      11 Jan 2012 22:45:42 -0000      1.42
+++ t/info_tests.t      5 Aug 2012 16:44:08 -0000       1.43
@@ -273,17 +273,19 @@
 ['note_in_strong',
 '@node Top
 
-One @strong{Note}.
+3 One @strong{Note}.
 
-3 @strong{Note a}.
+5 @strong{Note a}.
 
 
 
-2 @strong{note}.
+9 @strong{note}.
 
-4 @strong{note b}.
+11 @strong{note b}.
 
-6 @strong{ note}.
+13 @strong{ note}.
+
+15 @strong{note-bbb}.
 '],
 ['nested_multitable_anchor_index',
 '@node Top

Index: t/results/info_tests/note_in_strong.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/info_tests/note_in_strong.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- t/results/info_tests/note_in_strong.pl      1 Nov 2011 12:26:06 -0000       
1.7
+++ t/results/info_tests/note_in_strong.pl      5 Aug 2012 16:44:09 -0000       
1.8
@@ -51,7 +51,7 @@
           'contents' => [
             {
               'parent' => {},
-              'text' => 'One '
+              'text' => '3 One '
             },
             {
               'args' => [
@@ -94,7 +94,7 @@
           'contents' => [
             {
               'parent' => {},
-              'text' => '3 '
+              'text' => '5 '
             },
             {
               'args' => [
@@ -149,7 +149,7 @@
           'contents' => [
             {
               'parent' => {},
-              'text' => '2 '
+              'text' => '9 '
             },
             {
               'args' => [
@@ -192,7 +192,7 @@
           'contents' => [
             {
               'parent' => {},
-              'text' => '4 '
+              'text' => '11 '
             },
             {
               'args' => [
@@ -235,7 +235,7 @@
           'contents' => [
             {
               'parent' => {},
-              'text' => '6 '
+              'text' => '13 '
             },
             {
               'args' => [
@@ -267,6 +267,49 @@
           ],
           'parent' => {},
           'type' => 'paragraph'
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => '15 '
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'parent' => {},
+                      'text' => 'note-bbb'
+                    }
+                  ],
+                  'parent' => {},
+                  'type' => 'brace_command_arg'
+                }
+              ],
+              'cmdname' => 'strong',
+              'contents' => [],
+              'line_nr' => {
+                'file_name' => '',
+                'line_nr' => 15,
+                'macro' => ''
+              },
+              'parent' => {}
+            },
+            {
+              'parent' => {},
+              'text' => '.
+'
+            }
+          ],
+          'parent' => {},
+          'type' => 'paragraph'
         }
       ],
       'extra' => {
@@ -334,38 +377,49 @@
 
$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[11]{'contents'}[1]{'parent'}
 = $result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[11];
 
$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[11]{'contents'}[2]{'parent'}
 = $result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[11];
 $result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[11]{'parent'} = 
$result_trees{'note_in_strong'}{'contents'}[1];
+$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[12]{'parent'} = 
$result_trees{'note_in_strong'}{'contents'}[1];
+$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13]{'contents'}[0]{'parent'}
 = $result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13];
+$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13]{'contents'}[1]{'args'}[0];
+$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13]{'contents'}[1];
+$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13]{'contents'}[1]{'parent'}
 = $result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13];
+$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13]{'contents'}[2]{'parent'}
 = $result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13];
+$result_trees{'note_in_strong'}{'contents'}[1]{'contents'}[13]{'parent'} = 
$result_trees{'note_in_strong'}{'contents'}[1];
 $result_trees{'note_in_strong'}{'contents'}[1]{'extra'}{'node_content'}[0] = 
$result_trees{'note_in_strong'}{'contents'}[1]{'args'}[0]{'contents'}[1];
 
$result_trees{'note_in_strong'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}
 = $result_trees{'note_in_strong'}{'contents'}[1]{'extra'}{'node_content'};
 $result_trees{'note_in_strong'}{'contents'}[1]{'parent'} = 
$result_trees{'note_in_strong'};
 
 $result_texis{'note_in_strong'} = '@node Top
 
-One @strong{Note}.
+3 One @strong{Note}.
 
-3 @strong{Note a}.
+5 @strong{Note a}.
 
 
 
-2 @strong{note}.
+9 @strong{note}.
 
-4 @strong{note b}.
+11 @strong{note b}.
 
-6 @strong{ note}.
+13 @strong{ note}.
+
+15 @strong{note-bbb}.
 ';
 
 
 $result_texts{'note_in_strong'} = '
-One Note.
+3 One Note.
+
+5 Note a.
 
-3 Note a.
 
 
+9 note.
 
-2 note.
+11 note b.
 
-4 note b.
+13  note.
 
-6  note.
+15 note-bbb.
 ';
 
 $result_sectioning{'note_in_strong'} = {};
@@ -405,15 +459,17 @@
 
 File: ,  Node: Top,  Up: (dir)
 
-One *Note*.
+3 One *Note*.
+
+   5 *Note a*.
 
-   3 *Note a*.
+   9 *note*.
 
-   2 *note*.
+   11 *note b*.
 
-   4 *note b*.
+   13 * note*.
 
-   6 * note*.
+   15 *note-bbb*.
 
 
 Tag Table:
@@ -425,15 +481,6 @@
 $result_converted_errors{'info'}->{'note_in_strong'} = [
   {
     'file_name' => '',
-    'error_line' => ':3: warning: @strong{Note...} produces a spurious 
cross-reference in Info; reword to avoid that
-',
-    'text' => '@strong{Note...} produces a spurious cross-reference in Info; 
reword to avoid that',
-    'type' => 'warning',
-    'macro' => '',
-    'line_nr' => 3
-  },
-  {
-    'file_name' => '',
     'error_line' => ':5: warning: @strong{Note...} produces a spurious 
cross-reference in Info; reword to avoid that
 ',
     'text' => '@strong{Note...} produces a spurious cross-reference in Info; 
reword to avoid that',
@@ -443,15 +490,6 @@
   },
   {
     'file_name' => '',
-    'error_line' => ':9: warning: @strong{Note...} produces a spurious 
cross-reference in Info; reword to avoid that
-',
-    'text' => '@strong{Note...} produces a spurious cross-reference in Info; 
reword to avoid that',
-    'type' => 'warning',
-    'macro' => '',
-    'line_nr' => 9
-  },
-  {
-    'file_name' => '',
     'error_line' => ':11: warning: @strong{Note...} produces a spurious 
cross-reference in Info; reword to avoid that
 ',
     'text' => '@strong{Note...} produces a spurious cross-reference in Info; 
reword to avoid that',



reply via email to

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