texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/init/book.pm (book_convert_heading_command):


From: Patrice Dumas
Subject: branch master updated: * tp/init/book.pm (book_convert_heading_command): sync with HTML.pm.
Date: Thu, 25 Jul 2024 14:51:41 -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 4b3a240dde * tp/init/book.pm (book_convert_heading_command):  sync 
with HTML.pm.
4b3a240dde is described below

commit 4b3a240dde309f5f7c902001c9398a972a8558b1
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jul 25 20:51:38 2024 +0200

    * tp/init/book.pm (book_convert_heading_command):  sync with HTML.pm.
---
 ChangeLog       |  4 ++++
 tp/init/book.pm | 10 +++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 0607006e6c..105e345e86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-07-25  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/init/book.pm (book_convert_heading_command):  sync with HTML.pm.
+
 2024-07-20  Gavin Smith <gavinsmith0123@gmail.com>
 
        * util/htmlxref.cnf: Add use-package.
diff --git a/tp/init/book.pm b/tp/init/book.pm
index 18a12d6016..f1ab79a116 100644
--- a/tp/init/book.pm
+++ b/tp/init/book.pm
@@ -369,7 +369,15 @@ sub book_convert_heading_command($$$$$)
   # if set, the id is associated to the heading text
   my $heading_id;
   if ($opening_section) {
-    my $level = $opening_section->{'extra'}->{'section_level'};
+    my $level;
+    if ($opening_section->{'extra'}
+        and defined($opening_section->{'extra'}->{'section_level'})) {
+      $level = $opening_section->{'extra'}->{'section_level'};
+    } else {
+      # if Structuring sectioning_structure was not called on the
+      # document (cannot happen in main program or test_utils.pl tests)
+      $level = Texinfo::Common::section_level($opening_section);
+    }
     my $closed_strings = $self->close_registered_sections_level($level);
     $result .= join('', @{$closed_strings});
     $self->register_opened_section_level($level, "</div>\n");



reply via email to

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