texinfo-commits
[Top][All Lists]
Advanced

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

[7961] _abort_empty_line


From: gavinsmith0123
Subject: [7961] _abort_empty_line
Date: Fri, 22 Sep 2017 14:54:35 -0400 (EDT)

Revision: 7961
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7961
Author:   gavin
Date:     2017-09-22 14:54:35 -0400 (Fri, 22 Sep 2017)
Log Message:
-----------
_abort_empty_line

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Parser.pm

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2017-09-22 18:09:06 UTC (rev 7960)
+++ trunk/ChangeLog     2017-09-22 18:54:35 UTC (rev 7961)
@@ -1,5 +1,11 @@
 2017-09-22  Gavin Smith  <address@hidden>
 
+       * tp/Texinfo/Parser.pm (_abort_empty_line): Do not check for 
+       'spaces_before_argument' element on parent element.  Rename a 
+       variable.
+
+2017-09-22  Gavin Smith  <address@hidden>
+
        * tp/Texinfo/Parser.pm (_parse_texi) <'{' seen>: Set 
        spaces_before_argument on element for the argument itself, not 
        for the element corresponding to the command, which is the 

Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm  2017-09-22 18:09:06 UTC (rev 7960)
+++ trunk/tp/Texinfo/Parser.pm  2017-09-22 18:54:35 UTC (rev 7961)
@@ -2126,9 +2126,9 @@
 # consisting only of spaces.  This container is removed here, typically
 # this is called when non-space happens on a line.
 sub _abort_empty_line {
-  my ($self, $current, $additional_text) = @_;
+  my ($self, $current, $additional_spaces) = @_;
 
-  $additional_text = '' if (!defined($additional_text));
+  $additional_spaces = '' if (!defined($additional_spaces));
   if ($current->{'contents'} and @{$current->{'contents'}} 
        and $current->{'contents'}->[-1]->{'type'}
        and ($current->{'contents'}->[-1]->{'type'} eq 'empty_line' 
@@ -2135,12 +2135,14 @@
            or $current->{'contents'}->[-1]->{'type'} eq 
'empty_line_after_command'
            or $current->{'contents'}->[-1]->{'type'} eq 
'empty_spaces_before_argument'
            or $current->{'contents'}->[-1]->{'type'} eq 
'empty_spaces_after_close_brace')) {
+
     print STDERR "ABORT EMPTY "
     .$current->{'contents'}->[-1]->{'type'}
-    ." additional text |$additional_text|,"
+    ." additional text |$additional_spaces|,"
     ." current |$current->{'contents'}->[-1]->{'text'}|\n"
       if ($self->{'DEBUG'});
-    $current->{'contents'}->[-1]->{'text'} .= $additional_text;
+
+    $current->{'contents'}->[-1]->{'text'} .= $additional_spaces;
     # remove empty 'empty*before'.
     if ($current->{'contents'}->[-1]->{'text'} eq '') {
       # as we remove 'empty_spaces_before_argument', 'spaces_before_argument'
@@ -2151,13 +2153,6 @@
                 eq $current->{'contents'}->[-1]) {
         delete ($current->{'extra'}->{'spaces_before_argument'});
         delete ($current->{'extra'}) if !(keys(%{$current->{'extra'}}));
-      } elsif ($current->{'parent'} and $current->{'parent'}->{'extra'} 
-          and $current->{'parent'}->{'extra'}->{'spaces_before_argument'}
-          and $current->{'parent'}->{'extra'}->{'spaces_before_argument'} 
-                eq $current->{'contents'}->[-1]) {
-        delete ($current->{'parent'}->{'extra'}->{'spaces_before_argument'});
-        delete ($current->{'parent'}->{'extra'})
-          if !(keys(%{$current->{'parent'}->{'extra'}}));
       } elsif ($current->{'extra'} 
           and $current->{'extra'}->{'spaces_after_command'}
           and $current->{'extra'}->{'spaces_after_command'} 




reply via email to

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