texinfo-commits
[Top][All Lists]
Advanced

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

[6650] conditionalize a call to _count_added


From: Gavin D. Smith
Subject: [6650] conditionalize a call to _count_added
Date: Sun, 27 Sep 2015 22:09:07 +0000

Revision: 6650
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6650
Author:   gavin
Date:     2015-09-27 22:09:05 +0000 (Sun, 27 Sep 2015)
Log Message:
-----------
conditionalize a call to _count_added

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Convert/Plaintext.pm
    trunk/tp/tests/README

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-09-27 12:21:57 UTC (rev 6649)
+++ trunk/ChangeLog     2015-09-27 22:09:05 UTC (rev 6650)
@@ -1,5 +1,11 @@
 2015-09-27  Gavin Smith  <address@hidden>
 
+       * tp/tests/README: Mention -F option to makeinfo.
+       * tp/Texinfo/Convert/Plaintext.pm (_convert) <xref commands>:
+       Conditionalize a call to _count_added.
+
+2015-09-27  Gavin Smith  <address@hidden>
+
        * tp/t/README: Mention tests under tp/tests.  Remove "texinfo/" 
        from start of a path.
        * tp/tests/README: Change a word "one" to "a".  Add headings

Modified: trunk/tp/Texinfo/Convert/Plaintext.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Plaintext.pm       2015-09-27 12:21:57 UTC (rev 
6649)
+++ trunk/tp/Texinfo/Convert/Plaintext.pm       2015-09-27 22:09:05 UTC (rev 
6650)
@@ -2196,12 +2196,15 @@
           }
           $pre_quote = $quoting_required ? "\x{7f}" : '';
           $post_quote = $pre_quote;
-          $node_text =~ s/^(\s*)/$1$pre_quote/ if $pre_quote;
-          _count_added($self,$self->{'formatters'}[-1]{'container'},
-                       $pre_quote);
+          if ($pre_quote) {
+            $node_text =~ s/^(\s*)/$1$pre_quote/;
+            _count_added($self,$self->{'formatters'}[-1]{'container'},
+                         $pre_quote);
+          }
           $result .= $node_text;
-          _count_added($self,$self->{'formatters'}[-1]{'container'},
-            $self->{'formatters'}->[-1]->{'container'}->add_next($post_quote));
+          _count_added($self, $self->{'formatters'}[-1]{'container'},
+            $self->{'formatters'}->[-1]->{'container'}->add_next($post_quote))
+                 if $post_quote;
         } else { # Label same as node specification
           if ($file) {
             $result .= $self->_convert({'contents' => $file});

Modified: trunk/tp/tests/README
===================================================================
--- trunk/tp/tests/README       2015-09-27 12:21:57 UTC (rev 6649)
+++ trunk/tp/tests/README       2015-09-27 22:09:05 UTC (rev 6650)
@@ -62,7 +62,8 @@
 If the test results are as expected, copy the output files onto the 
 reference files.  Otherwise, if they need more investigation, see "Tests 
 specification" below, to find out what input file, etc. was used for the 
-test.
+test.  Sometimes you need to use "makeinfo -F" to force an output file 
+to be created.
 
 When running tests via parser_tests.sh or run_parser_all.sh, then
 a test failure causes




reply via email to

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