[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sun, 14 Jan 2024 09:30:47 -0500 (EST) |
branch: master
commit 037c8167cc601ae9d5f682bfd11cbae1ebc342d8
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 14 15:24:44 2024 +0100
* Texinfo/Convert/Converter.pm, Texinfo/Structuring.pm: add explicit
scalar().
---
ChangeLog | 5 +++++
tp/Texinfo/Convert/Converter.pm | 2 +-
tp/Texinfo/Convert/HTML.pm | 2 ++
tp/Texinfo/Structuring.pm | 2 +-
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a4e8e68710..4152aa337c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-14 Patrice Dumas <pertusus@free.fr>
+
+ * Texinfo/Convert/Converter.pm, Texinfo/Structuring.pm: add explicit
+ scalar().
+
2024-01-14 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/Text.pm (_convert): switch arguments and make
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index b0e60a4239..36ee4260b1 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -446,7 +446,7 @@ sub output($$)
if ($self->get_conf('DEBUG'));
}
- if ($output_units and @$output_units) {
+ if ($output_units and scalar(@$output_units)) {
foreach my $output_unit (@$output_units) {
my $output_unit_text = $self->convert_output_unit($output_unit);
$output .= $self->write_or_return($output_unit_text, $fh);
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 07fd3f5d2c..ee9ef48074 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -12465,6 +12465,8 @@ sub output($$)
# setup untranslated strings
$self->_translate_names();
+ # The XS code override rebuilds output units, so there is no need to call
+ # rebuild_output_units.
my $files_source_info
= $self->_prepare_units_directions_files($output_units, $special_units,
$associated_special_units,
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index dde6da31b7..6c80569160 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -1760,7 +1760,7 @@ sub split_pages($$)
my $output_units = shift;
my $split = shift;
- return undef if (!$output_units or !@$output_units);
+ return undef if (!$output_units or !scalar(@$output_units));
my $split_level;
if (!$split) {