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 (_expand_macro_body):


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/ParserNonXS.pm (_expand_macro_body): ignore arg value if there are less arguments given to the macro than the argument found.
Date: Fri, 31 Dec 2021 09:09:39 -0500

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 63b06709b1 * tp/Texinfo/ParserNonXS.pm (_expand_macro_body): ignore 
arg value if there are less arguments given to the macro than the argument 
found.
63b06709b1 is described below

commit 63b06709b15ab3576c247341f06d1a5f583c8520
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Dec 31 15:09:28 2021 +0100

    * tp/Texinfo/ParserNonXS.pm (_expand_macro_body): ignore arg value
    if there are less arguments given to the macro than the argument
    found.
---
 ChangeLog                 | 6 ++++++
 tp/Texinfo/ParserNonXS.pm | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 4961494aed..4c84e5b814 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-12-30  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/ParserNonXS.pm (_expand_macro_body): ignore arg value
+       if there are less arguments given to the macro than the argument
+       found.
+
 2021-12-30  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_parse_texi): check if top_context_command
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index fb639d168c..7a174f01d4 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -2150,7 +2150,9 @@ sub _expand_macro_body($$$$) {
         my $arg = $1;
         my $formal_arg_index = _lookup_macro_parameter($macro, $arg);
         if (defined($formal_arg_index)) {
-          $result .= $args->[$formal_arg_index];
+          if ($formal_arg_index < scalar(@$args)) {
+            $result .= $args->[$formal_arg_index];
+          }
         } else {
           $self->_line_error(sprintf(__(
          "\\ in \@%s expansion followed `%s' instead of parameter name or 
\\"), 



reply via email to

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