texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/texi2any.pl: handle the case of 'FORMAT_MENU


From: Patrice Dumas
Subject: branch master updated: * tp/texi2any.pl: handle the case of 'FORMAT_MENU' not being defined and format 'nodes_tree' being set. Can happen if format is structure.
Date: Sat, 21 Aug 2021 05:53:04 -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 70e5601  * tp/texi2any.pl: handle the case of 'FORMAT_MENU' not being 
defined and format 'nodes_tree' being set. Can happen if format is structure.
70e5601 is described below

commit 70e5601ede7300f992a4727288a642a07ac3bcad
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 21 11:52:53 2021 +0200

    * tp/texi2any.pl: handle the case of 'FORMAT_MENU'
    not being defined and format 'nodes_tree' being set.
    Can happen if format is structure.
---
 ChangeLog      |  6 ++++++
 tp/texi2any.pl | 10 +++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f99e744..765728e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2021-08-21  Patrice Dumas  <pertusus@free.fr>
 
+       * tp/texi2any.pl: handle the case of 'FORMAT_MENU'
+       not being defined and format 'nodes_tree' being set.
+       Can happen if format is structure.
+
+2021-08-21  Patrice Dumas  <pertusus@free.fr>
+
        * tp/Texinfo/ParserNonXS.pm (_top_context_command)
        (_parse_texi),
        tp/Texinfo/Common.pm (%headings_specification_commands):
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index ad1d605..cab90e8 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -1315,12 +1315,16 @@ while(@input_files) {
 
     # it is not get_conf('FORMAT_MENU') but $parser_options as
     # $parser_options is set to the output default and then replaced
-    # with get_conf('FORMAT_MENU') is needed
-    if ($parser_options->{'FORMAT_MENU'} eq 'menu') {
+    # with get_conf('FORMAT_MENU') if needed.
+    # 'FORMAT_MENU' may not be defined in some special cases,
+    # for instance if format is structure.
+    if (not defined($parser_options->{'FORMAT_MENU'})
+        or $parser_options->{'FORMAT_MENU'} eq 'menu') {
       Texinfo::Structuring::set_menus_node_directions($parser);
     }
     $top_node = Texinfo::Structuring::nodes_tree($parser);
-    if ($parser_options->{'FORMAT_MENU'} eq 'menu') {
+    if (not defined($parser_options->{'FORMAT_MENU'})
+        or $parser_options->{'FORMAT_MENU'} eq 'menu') {
       Texinfo::Structuring::complete_node_tree_with_menus($parser, $top_node);
     }
   }



reply via email to

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