texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/HTML.pm (_default_format_beg


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/HTML.pm (_default_format_begin_file): do not set $command_for_title to an output unit, it should be a tree element. The associated element should be defined anyway.
Date: Thu, 14 Dec 2023 18:24: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 4bd3c980eb * tp/Texinfo/Convert/HTML.pm (_default_format_begin_file): 
do not set $command_for_title to an output unit, it should be a tree element. 
The associated element should be defined anyway.
4bd3c980eb is described below

commit 4bd3c980eb637a023ceb6565a72997e2c7d526c9
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Dec 15 00:24:35 2023 +0100

    * tp/Texinfo/Convert/HTML.pm (_default_format_begin_file): do not set
    $command_for_title to an output unit, it should be a tree element.
    The associated element should be defined anyway.
    
    * tp/Texinfo/Convert/HTML.pm (output): keep file_info_label_element
    conflicting with redirection file, not the associated contents.
---
 ChangeLog                  |  9 +++++++++
 tp/Texinfo/Convert/HTML.pm | 25 +++++++++----------------
 2 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2c6b09cfc0..57ecf64025 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-12-14  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (_default_format_begin_file): do not set
+       $command_for_title to an output unit, it should be a tree element.
+       The associated element should be defined anyway.
+
+       * tp/Texinfo/Convert/HTML.pm (output): keep file_info_label_element
+       conflicting with redirection file, not the associated contents.
+
 2023-12-14  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides)
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 1f87cba437..4621c3bac6 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -10800,14 +10800,8 @@ sub _default_format_begin_file($$$)
       $node_command = $element_command->{'extra'}->{'associated_node'};
     }
 
-    if ($self->get_conf('SPLIT')) {
-      if (defined($element_command)) {
-        $command_for_title = $element_command;
-      } else {
-        # this should correspond to special_unit units only
-        # FIXME the API should be modified to handle differently
-        $command_for_title = $output_unit;
-      }
+    if ($self->get_conf('SPLIT') and defined($element_command)) {
+      $command_for_title = $element_command;
     }
   }
 
@@ -12158,7 +12152,6 @@ sub output($$)
     foreach my $label (sort(keys (%{$self->{'identifiers_target'}}))) {
       my $target_element = $self->{'identifiers_target'}->{$label};
       my $label_element = Texinfo::Common::get_label_element($target_element);
-      my $label_contents = $label_element->{'contents'};
       my $target = $self->_get_target($target_element);
       # filename may not be defined in case of an @anchor or similar in
       # @titlepage, and @titlepage is not used.
@@ -12186,8 +12179,8 @@ sub output($$)
           $self->converter_line_warn(
              sprintf(__("\@%s `%s' file %s for redirection exists"),
                $target_element->{'cmdname'},
-               Texinfo::Convert::Texinfo::convert_to_texinfo({'contents'
-                                                   => $label_contents}),
+               Texinfo::Convert::Texinfo::convert_to_texinfo(
+                       {'contents' => $label_element->{'contents'}}),
                $redirection_filename),
             $target_element->{'source_info'});
           my $file_source = $files_source_info->{$redirection_filename};
@@ -12227,13 +12220,13 @@ sub output($$)
               $conflicting_node->{'source_info'}, 1);
           } elsif ($file_info_type eq 'redirection') {
             my $conflicting_node = $file_source->{'file_info_element'};
-            my $conflicting_label_contents
-                 = $file_source->{'file_info_label_contents'};
+            my $conflicting_label_element
+                 = $file_source->{'file_info_label_element'};
             $self->converter_line_warn(
                sprintf(__("conflict with \@%s `%s' redirection file"),
                  $conflicting_node->{'cmdname'},
-                 Texinfo::Convert::Texinfo::convert_to_texinfo({'contents'
-                                            => $conflicting_label_contents}),
+                 Texinfo::Convert::Texinfo::convert_to_texinfo(
+                  {'contents' => $conflicting_label_element->{'contents'}})
                  ),
               $conflicting_node->{'source_info'}, 1);
           } elsif ($file_info_type eq 'section') {
@@ -12262,7 +12255,7 @@ sub output($$)
           = {'file_info_type' => 'redirection',
              'file_info_element' => $target_element,
              'file_info_path' => undef,
-             'file_info_label_contents' => $label_contents};
+             'file_info_label_element' => $label_element};
         my $redirection_page
           = 
&{$self->formatting_function('format_node_redirection_page')}($self,
                                                                
$target_element);



reply via email to

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