texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/init/chm.pm: simplify the code getting the t


From: Patrice Dumas
Subject: branch master updated: * tp/init/chm.pm: simplify the code getting the top element file name.
Date: Tue, 01 Feb 2022 16:23:54 -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 b36d8f0ddd * tp/init/chm.pm: simplify the code getting the top element 
file name.
b36d8f0ddd is described below

commit b36d8f0dddc8e633cc0c63fac029da00dbb1d38c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Feb 1 22:23:45 2022 +0100

    * tp/init/chm.pm: simplify the code getting the top element file name.
---
 ChangeLog                  | 4 ++++
 tp/Texinfo/Convert/HTML.pm | 4 ++--
 tp/init/chm.pm             | 5 ++---
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b7347f1bc2..db97c8f6f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-02-01  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/init/chm.pm: simplify the code getting the top element file name.
+
 2022-02-01  Patrice Dumas  <pertusus@free.fr>
 
        * tp/init/epub3.pm, tp/init/chm.pm: use command_href instead
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 423e685290..2c8f0c1596 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -8946,8 +8946,8 @@ sub _default_format_frame_files($$)
     my $doctype = $self->get_conf('FRAMESET_DOCTYPE');
     my $root_html_element_attributes = 
$self->_root_html_element_attributes_string();
     my $top_file = '';
-    if ($self->global_element('Top')) {
-      my $top_element = $self->global_element('Top');
+    my $top_element = $self->global_element('Top');
+    if ($top_element) {
       $top_file = $top_element->{'structure'}->{'unit_filename'};
     }
     my $title = $self->{'title_string'};
diff --git a/tp/init/chm.pm b/tp/init/chm.pm
index 8e5f2473e7..c91016956b 100644
--- a/tp/init/chm.pm
+++ b/tp/init/chm.pm
@@ -357,9 +357,8 @@ sub chm_init($)
   my $title = _chm_convert_tree_to_text($self, $self->get_info('title_tree'));
   my $top_file = '';
   my $top_element = $self->global_element('Top');
-  if ($top_element and $top_element->{'extra'}->{'unit_command'}) {
-    $top_file 
-     = $self->command_filename($top_element->{'extra'}->{'unit_command'});
+  if ($top_element) {
+    $top_file = $top_element->{'structure'}->{'unit_filename'};
   }
 
   print $hhp_fh <<EOT;



reply via email to

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