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: use command_href instead of doing


From: Patrice Dumas
Subject: branch master updated: tp/init/chm.pm: use command_href instead of doing the href from a separate file and target.
Date: Tue, 01 Feb 2022 16:17:38 -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 50b9a0439f tp/init/chm.pm: use command_href instead of doing the href 
from a separate file and target.
50b9a0439f is described below

commit 50b9a0439f08ed1b39f8521472b9c2042e4708f8
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Feb 1 22:17:17 2022 +0100

    tp/init/chm.pm: use command_href instead of doing the href from a separate 
file and target.
---
 tp/init/chm.pm | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/tp/init/chm.pm b/tp/init/chm.pm
index 4f1ec82afa..8e5f2473e7 100644
--- a/tp/init/chm.pm
+++ b/tp/init/chm.pm
@@ -241,19 +241,7 @@ sub chm_init($)
   if ($index_entries) {
     foreach my $index_name (sort(keys(%$index_entries))) {
       foreach my $index_entry_ref (@{$index_entries->{$index_name}}) {
-        my $file = $self->command_filename($index_entry_ref->{'command'});
-        # happens for things in @titlepage when it is not output
-        if (!defined($file)) {
-          if ($self->{'tree_units'} and $self->{'tree_units'}->[0]
-             and 
defined($self->{'tree_units'}->[0]->{'structure'}->{'unit_filename'})) {
-            # In that case use the first page.
-            $file = 
$self->{'tree_units'}->[0]->{'structure'}->{'unit_filename'};
-          } else {
-            $file = '';
-          }
-        }
-        my $anchor = $self->command_id($index_entry_ref->{'command'});
-        my $origin_href = "$file#$anchor";
+        my $origin_href = $self->command_href($index_entry_ref->{'command'}, 
'');
         my $entry = _chm_convert_tree_to_text($self,
                                {'contents' => $index_entry_ref->{'content'}},
                                {'code' => $index_entry_ref->{'in_code'}});



reply via email to

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