texinfo-commits
[Top][All Lists]
Advanced

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

[7568] _count_added don't call _add_lines_count


From: gavinsmith0123
Subject: [7568] _count_added don't call _add_lines_count
Date: Sat, 24 Dec 2016 14:50:59 +0000 (UTC)

Revision: 7568
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7568
Author:   gavin
Date:     2016-12-24 14:50:59 +0000 (Sat, 24 Dec 2016)
Log Message:
-----------
_count_added don't call _add_lines_count

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2016-12-24 10:07:27 UTC (rev 7567)
+++ trunk/ChangeLog     2016-12-24 14:50:59 UTC (rev 7568)
@@ -1,5 +1,10 @@
 2016-12-24  Gavin Smith  <address@hidden>
 
+       * tp/Texinfo/Convert/Plaintext.pm (_count_added): Inline call
+       to _add_lines_count and use variable to shorten expressions.
+
+2016-12-24  Gavin Smith  <address@hidden>
+
        * tp/texi2any.pl: Set '$Texinfo::XSLoader::disable_XS'
        instead of '$Texinfo::Paragraph::disable_XS'.
 

Modified: trunk/tp/Texinfo/Convert/Plaintext.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Plaintext.pm       2016-12-24 10:07:27 UTC (rev 
7567)
+++ trunk/tp/Texinfo/Convert/Plaintext.pm       2016-12-24 14:50:59 UTC (rev 
7568)
@@ -810,16 +810,13 @@
   my $container = shift;
   my $text = shift;
 
-  $self->_add_lines_count($container->end_line_count());
+  my $count_context = $self->{'count_context'}->[-1];
+  $count_context->{'lines'} += $container->end_line_count();
 
-  #$self->_add_text_count($text);
-  #$self->{'count_context'}->[-1]->{'bytes'} +=
-  #  Texinfo::Common::count_bytes($self, $text,
-  #                               $self->{'output_perl_encoding'});
-  if (!defined $self->{'count_context'}->[-1]->{'pending_text'}) {
-    $self->{'count_context'}->[-1]->{'pending_text'} = '';
+  if (!defined $count_context->{'pending_text'}) {
+    $count_context->{'pending_text'} = '';
   }
-  $self->{'count_context'}->[-1]->{'pending_text'} .= $text;
+  $count_context->{'pending_text'} .= $text;
   return $text;
 }
 




reply via email to

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