[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/HTML.pm (_convert_heading_co
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/HTML.pm (_convert_heading_command), tp/init/book.pm (book_convert_heading_command): if USE_NODES = 0 and there are no sectioning commands, $output_unit->{'unit_command'} does not exist. |
Date: |
Sun, 18 Feb 2024 10:24: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 fc7dd50688 * tp/Texinfo/Convert/HTML.pm (_convert_heading_command),
tp/init/book.pm (book_convert_heading_command): if USE_NODES = 0 and there are
no sectioning commands, $output_unit->{'unit_command'} does not exist.
fc7dd50688 is described below
commit fc7dd5068857c6a1669f307327b0ad8c83574a89
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Feb 18 16:24:34 2024 +0100
* tp/Texinfo/Convert/HTML.pm (_convert_heading_command),
tp/init/book.pm (book_convert_heading_command): if USE_NODES = 0 and
there are no sectioning commands, $output_unit->{'unit_command'} does
not exist.
---
ChangeLog | 7 +++++++
tp/Texinfo/Convert/HTML.pm | 5 ++++-
tp/Texinfo/XS/convert/convert_html.c | 2 ++
tp/init/book.pm | 5 ++++-
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f9f35abe3e..59d3d8a06e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-02-18 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/HTML.pm (_convert_heading_command),
+ tp/init/book.pm (book_convert_heading_command): if USE_NODES = 0 and
+ there are no sectioning commands, $output_unit->{'unit_command'} does
+ not exist.
+
2024-02-18 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Report.pm (format_line_message, line_warn, line_error):
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 6ebab0e2e3..f533f70375 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -4920,7 +4920,10 @@ sub _convert_heading_command($$$$$)
my $heading_level;
# node is used as heading if there is nothing else.
if ($cmdname eq 'node') {
- if ($output_unit->{'unit_command'} eq $element
+ # NOTE: if USE_NODES = 0 and there are no sectioning commands,
+ # $output_unit->{'unit_command'} does not exist.
+ if ($output_unit->{'unit_command'}
+ and $output_unit->{'unit_command'} eq $element
and $element->{'extra'}
and not $element->{'extra'}->{'associated_section'}
and defined($element->{'extra'}->{'normalized'})) {
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index df62b2be64..4fe3e7656f 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -10063,6 +10063,8 @@ convert_heading_command (CONVERTER *self, const enum
command_id cmd,
ELEMENT *associated_section
= lookup_extra_element (element, "associated_section");
char *normalized = lookup_extra_string (element, "normalized");
+ /* NOTE: if USE_NODES = 0 and there are no sectioning commands,
+ output_unit->unit_command is NUL (and not equal to elemen). */
if (output_unit->unit_command == element
&& !associated_section
&& normalized)
diff --git a/tp/init/book.pm b/tp/init/book.pm
index 812cfe8bc0..dde4919c2f 100644
--- a/tp/init/book.pm
+++ b/tp/init/book.pm
@@ -326,7 +326,10 @@ sub book_convert_heading_command($$$$$)
my $heading_level;
# node is used as heading if there is nothing else.
if ($cmdname eq 'node') {
- if ($output_unit->{'unit_command'} eq $element
+ # NOTE: if USE_NODES = 0 and there are no sectioning commands,
+ # $output_unit->{'unit_command'} does not exist.
+ if ($output_unit->{'unit_command'}
+ and $output_unit->{'unit_command'} eq $element
and $element->{'extra'}
and not $element->{'extra'}->{'associated_section'}
and defined($element->{'extra'}->{'normalized'})) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/HTML.pm (_convert_heading_command), tp/init/book.pm (book_convert_heading_command): if USE_NODES = 0 and there are no sectioning commands, $output_unit->{'unit_command'} does not exist.,
Patrice Dumas <=