texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/ParserNonXS.pm (_end_line): do not r


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/ParserNonXS.pm (_end_line): do not really keep the @include in tree when they have been replaced to avoid different test results until the XS parser has been modified (or not).
Date: Sat, 21 Aug 2021 06:35:11 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 6507256  * tp/Texinfo/ParserNonXS.pm (_end_line): do not really keep 
the @include in tree when they have been replaced to avoid different test 
results until the XS parser has been modified (or not).
6507256 is described below

commit 65072560f55fc3bd52207a8ac8049431a9db886b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 21 12:34:56 2021 +0200

    * tp/Texinfo/ParserNonXS.pm (_end_line): do not really
    keep the @include in tree when they have been replaced
    to avoid different test results until the XS parser has
    been modified (or not).
---
 ChangeLog                 |  7 +++++++
 tp/Texinfo/ParserNonXS.pm | 11 ++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b17aa14..4e4acce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2021-08-21  Patrice Dumas  <pertusus@free.fr>
 
+       * tp/Texinfo/ParserNonXS.pm (_end_line): do not really
+       keep the @include in tree when they have been replaced
+       to avoid different test results until the XS parser has
+       been modified (or not).
+
+2021-08-21  Patrice Dumas  <pertusus@free.fr>
+
        * tp/Texinfo/Convert/TexinfoXML.pm (%commands_formatting):
        format @| as divideheading element.
        * util/texinfo.dtd: add divideheading.  Add heading marks, such
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 7b93a23..8db0123 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -3026,7 +3026,7 @@ sub _end_line($$$)
                 'pending' => [],
                 'fh' => $filehandle };
               $current->{'extra'}->{'file'} = $file;
-              # we set thetype to replaced to tell converters not to
+              # we set the type to replaced to tell converters not to
               # expand the @-command
               $current->{'type'} = 'replaced';
             } else {
@@ -3166,8 +3166,13 @@ sub _end_line($$$)
         if ($close_preformatted_commands{$command});
     }
     # Ignore @setfilename in included file, as said in the manual.
-    if ($command eq 'setfilename'
-         and scalar(@{$self->{'input'}}) > 1) {
+    if (($command eq 'setfilename'
+           and scalar(@{$self->{'input'}}) > 1)
+      # TODO remove this condition if/when the XS parser has been updated
+      # to output @include with type replaced when the file was found
+        or (scalar(@{$current->{'contents'}})
+             and exists($current->{'contents'}->[-1]->{'type'})
+             and $current->{'contents'}->[-1]->{'type'} eq 'replaced')) {
       # TODO keep the information
       pop @{$current->{'contents'}};
     } elsif ($command eq 'setfilename'



reply via email to

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