[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/HTML.pm (_prepare_conversion
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/HTML.pm (_prepare_conversion_tree_units, output): set special elements net and prev in _prepare_conversion_tree_units and not in output, in order to do it if called through convert(). |
Date: |
Wed, 04 Jan 2023 09:34:46 -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 45060a5b3b * tp/Texinfo/Convert/HTML.pm
(_prepare_conversion_tree_units, output): set special elements net and prev in
_prepare_conversion_tree_units and not in output, in order to do it if called
through convert().
45060a5b3b is described below
commit 45060a5b3bff419d5ca3ff09cbcbe14bbcc42dda
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Jan 4 15:34:35 2023 +0100
* tp/Texinfo/Convert/HTML.pm (_prepare_conversion_tree_units, output):
set special elements net and prev in _prepare_conversion_tree_units
and not in output, in order to do it if called through convert().
---
ChangeLog | 6 ++++++
tp/Texinfo/Convert/HTML.pm | 18 +++++++++---------
.../converters_tests/footnote_no_number_separate.pl | 3 ++-
.../footnotestyle_separate_html_text_no_monolithic.pl | 1 +
.../index_entry_in_footnote_sections_separate.pl | 1 +
.../indices/index_entry_in_footnote_separate.pl | 1 +
6 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1bf3e49c44..2006b1fe67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-01-04 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/HTML.pm (_prepare_conversion_tree_units, output):
+ set special elements net and prev in _prepare_conversion_tree_units
+ and not in output, in order to do it if called through convert().
+
2023-01-04 Patrice Dumas <pertusus@free.fr>
* tp/tests/layout/Makefile.am (EXTRA_DIST): remove Texinfo files not
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 48be8e587a..a4d65178fd 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -8727,6 +8727,15 @@ sub _prepare_conversion_tree_units($$$$)
# reset to the default
$self->set_global_document_commands('before', \@conf_for_special_elements);
+ if ($special_elements and defined($tree_units) and scalar(@$tree_units)) {
+ my $previous_tree_unit = $tree_units->[-1];
+ foreach my $special_element (@$special_elements) {
+ $special_element->{'structure'}->{'unit_prev'} = $previous_tree_unit;
+ $previous_tree_unit->{'structure'}->{'unit_next'} = $special_element;
+ $previous_tree_unit = $special_element;
+ }
+ }
+
#if ($tree_units) {
# foreach my $element(@{$tree_units}) {
# print STDERR "ELEMENT $element->{'type'}: $element\n";
@@ -10565,15 +10574,6 @@ sub output($$)
$destination_directory, $output_filename, $document_name);
}
- if ($special_elements and defined($tree_units) and scalar(@$tree_units)) {
- my $previous_tree_unit = $tree_units->[-1];
- foreach my $special_element (@$special_elements) {
- $special_element->{'structure'}->{'unit_prev'} = $previous_tree_unit;
- $previous_tree_unit->{'structure'}->{'unit_next'} = $special_element;
- $previous_tree_unit = $special_element;
- }
- }
-
$self->_prepare_contents_elements();
# do tree units directions.
diff --git a/tp/t/results/converters_tests/footnote_no_number_separate.pl
b/tp/t/results/converters_tests/footnote_no_number_separate.pl
index 76994c5e6d..38812c0169 100644
--- a/tp/t/results/converters_tests/footnote_no_number_separate.pl
+++ b/tp/t/results/converters_tests/footnote_no_number_separate.pl
@@ -404,7 +404,8 @@
$result_converted{'html_text'}->{'footnote_no_number_separate'} = '<div class="t
<p>Para<a class="footnote" id="DOCF1" href="#FOOT1"><sup>*</sup></a>.
</p>
<p>Para2<a class="footnote" id="DOCF2" href="#FOOT2"><sup>*</sup></a>.
-</p></div>
+</p><hr>
+</div>
</div>
<div class="element-footnotes" id="SEC_Footnotes">
<div class="nav-panel">
diff --git
a/tp/t/results/html_tests/footnotestyle_separate_html_text_no_monolithic.pl
b/tp/t/results/html_tests/footnotestyle_separate_html_text_no_monolithic.pl
index 1f9c2c181e..661c9492cc 100644
--- a/tp/t/results/html_tests/footnotestyle_separate_html_text_no_monolithic.pl
+++ b/tp/t/results/html_tests/footnotestyle_separate_html_text_no_monolithic.pl
@@ -382,6 +382,7 @@
$result_converted{'html_text'}->{'footnotestyle_separate_html_text_no_monolithic
</div>
<h2 class="chapter" id="Chap">1 Chap</h2>
+<hr>
</div>
</div>
<div class="element-footnotes" id="SEC_Footnotes">
diff --git a/tp/t/results/indices/index_entry_in_footnote_sections_separate.pl
b/tp/t/results/indices/index_entry_in_footnote_sections_separate.pl
index 661efafb70..024008dbff 100644
--- a/tp/t/results/indices/index_entry_in_footnote_sections_separate.pl
+++ b/tp/t/results/indices/index_entry_in_footnote_sections_separate.pl
@@ -536,6 +536,7 @@
$result_converted{'html_text'}->{'index_entry_in_footnote_sections_separate'} =
<tr><td colspan="3"><hr></td></tr>
</table>
</div>
+<hr>
</div>
</div>
<div class="element-footnotes" id="SEC_Footnotes">
diff --git a/tp/t/results/indices/index_entry_in_footnote_separate.pl
b/tp/t/results/indices/index_entry_in_footnote_separate.pl
index 1c7297ad3a..5717d93976 100644
--- a/tp/t/results/indices/index_entry_in_footnote_separate.pl
+++ b/tp/t/results/indices/index_entry_in_footnote_separate.pl
@@ -645,6 +645,7 @@
$result_converted{'html_text'}->{'index_entry_in_footnote_separate'} = '<a class
</td></tr></table>
</div>
+<hr>
<div class="element-footnotes" id="SEC_Footnotes">
<div class="nav-panel">
<p>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/HTML.pm (_prepare_conversion_tree_units, output): set special elements net and prev in _prepare_conversion_tree_units and not in output, in order to do it if called through convert().,
Patrice Dumas <=