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(_parse_def, _end_line


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/ParserNonXS.pm(_parse_def, _end_line): put information about documentlanguage into the tree only if defined.
Date: Sat, 28 Aug 2021 08:48:03 -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 2db3e91  * tp/Texinfo/ParserNonXS.pm(_parse_def, _end_line): put 
information about documentlanguage into the tree only if defined.
2db3e91 is described below

commit 2db3e910e23ab6ee313e965fb1b254216778e64d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 28 14:47:55 2021 +0200

    * tp/Texinfo/ParserNonXS.pm(_parse_def, _end_line): put
    information about documentlanguage into the tree only if defined.
---
 ChangeLog                 | 5 +++++
 tp/Texinfo/ParserNonXS.pm | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0686442..f7f385c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-08-28  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/ParserNonXS.pm(_parse_def, _end_line): put
+       information about documentlanguage into the tree only if defined.
+
 2021-08-28  Gavin Smith  <gavinsmith0123@gmail.com>
 
        Fix setting documentlanguage from command line
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index a000830..54d59ec 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -2324,7 +2324,7 @@ sub _parse_def($$$)
     my $content = { 'text' => $prepended, 'parent' => $bracketed };
     # the prepended string is an english string (such as Function).  If
     # documentlanguage is set it needs to be translated during the conversion.
-    if ($self->{'documentlanguage'}) {
+    if (defined($self->{'documentlanguage'})) {
       $content->{'type'} = 'untranslated';
       $content->{'extra'}->{'documentlanguage'} = $self->{'documentlanguage'};
     }
@@ -2789,8 +2789,10 @@ sub _end_line($$$)
               or $command_index{$def_command} eq 'vr'
                   and $def_command ne 'defcv') {
             undef $index_entry;
-            $current->{'parent'}->{'extra'}->{'documentlanguage'}
+            if (defined($self->{'documentlanguage'})) {
+              $current->{'parent'}->{'extra'}->{'documentlanguage'}
                      = $self->{'documentlanguage'};
+            }
           }
         }
         my $index_contents;



reply via email to

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