[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/HTML.pm (output_internal_lin
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/HTML.pm (output_internal_links): add subentries to index entries text. |
Date: |
Sun, 20 Nov 2022 11:24:08 -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 a8f612fece * tp/Texinfo/Convert/HTML.pm (output_internal_links): add
subentries to index entries text.
a8f612fece is described below
commit a8f612fece2acfcf8b20c4201486a4d095a46139
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Nov 20 17:23:25 2022 +0100
* tp/Texinfo/Convert/HTML.pm (output_internal_links): add subentries
to index entries text.
---
ChangeLog | 5 +++++
tp/TODO | 2 --
tp/Texinfo/Convert/HTML.pm | 8 +++++++-
.../res_parser/formatting/internal_links_formatting.txt | 16 ++++++++--------
4 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ffbab631fa..c58c076497 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-11-20 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/HTML.pm (output_internal_links): add subentries
+ to index entries text.
+
2022-11-20 Gavin Smith <gavinsmith0123@gmail.com>
info.js improvements
diff --git a/tp/TODO b/tp/TODO
index 4be0d894b9..d68ff237f2 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -10,8 +10,6 @@ This is the todo list for texi2any
Before next release
===================
-internal_links_formatting @subentry handling
-
Bugs
====
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 448b237f57..e49a873cb8 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -10265,8 +10265,14 @@ sub output_internal_links($)
# Obtain term by converting to text
my $converter_options = {%options};
$converter_options->{'code'} = $index_entry->{'in_code'};
+ my @contents = @{$index_entry->{'entry_content'}};
+ my $subentries_tree
+ =
$self->comma_index_subentries_tree($index_entry->{'entry_element'});
+ if (defined($subentries_tree)) {
+ push @contents, @{$subentries_tree->{'contents'}};
+ }
my $index_term = Texinfo::Convert::Text::convert_to_text(
- {'contents' => $index_entry->{'entry_content'}},
$converter_options);
+ {'contents' => \@contents}, $converter_options);
if (defined($index_term) and $index_term =~ /\S/) {
$out_string .= $href if (defined($href));
$out_string .= "\t$index_name\t";
diff --git
a/tp/tests/layout/res_parser/formatting/internal_links_formatting.txt
b/tp/tests/layout/res_parser/formatting/internal_links_formatting.txt
index 95fff8eca3..6a2e0765f7 100644
--- a/tp/tests/layout/res_parser/formatting/internal_links_formatting.txt
+++ b/tp/tests/layout/res_parser/formatting/internal_links_formatting.txt
@@ -17,7 +17,7 @@ formatting.html#index-_002d_002doption-1 cp -option
formatting.html#index-_002e cp .
formatting.html#index-_003f cp ?
formatting.html#index-a cp a
-formatting.html#index-aaa-bbb cp aaa
+formatting.html#index-aaa-bbb cp aaa, bbb
formatting.html#index-a_002d_002d_002da cp a--a
formatting.html#index-copying-a_002d_002dasis cp a--asis
formatting.html#index-titlepage-a_002d_002dasis cp a--asis
@@ -27,9 +27,9 @@ formatting.html#index-copying-b-2 cp b
formatting.html#index-titlepage-b-2 cp b
formatting.html#index-b-4 cp b
formatting.html#index-b-5 cp b
-formatting.html#index-b_002d_002d_002db-c_002d_002d_002dc cp b--b
+formatting.html#index-b_002d_002d_002db-c_002d_002d_002dc cp b--b,
c--c
formatting.html#index-counting-entry cp counting entry
-formatting.html#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff
cp d--dd
+formatting.html#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff
cp d--dd, e--ee, f--ff
formatting.html#index-copying-d_002d_002defcv_005fname cp d--efcv_name
formatting.html#index-copying-d_002d_002defcv_005fname-1 cp
d--efcv_name
formatting.html#index-titlepage-d_002d_002defcv_005fname cp
d--efcv_name
@@ -86,7 +86,7 @@ formatting.html#index-copying-d_002d_002defvr_005fname
cp d--efvr_name
formatting.html#index-titlepage-d_002d_002defvr_005fname cp
d--efvr_name
formatting.html#index-d_002d_002defvr_005fname cp d--efvr_name
formatting.html#index-d_002d_002defvr_005fname-1 cp d--efvr_name
-formatting.html#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll
cp g--gg
+formatting.html#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll
cp g--gg, h--hh jjj, k--kk, l--ll
formatting.html#index-copying-index-entry-between-item-and-itemx cp
index entry between item and itemx
formatting.html#index-copying-index-entry-between-item-and-itemx-1 cp
index entry between item and itemx
formatting.html#index-titlepage-index-entry-between-item-and-itemx cp
index entry between item and itemx
@@ -270,9 +270,9 @@ formatting.html#index-deffnx-1 fn deffnx
formatting.html#index-deffnx-2 fn deffnx
formatting.html#index-deffnx-3 fn deffnx
formatting.html#index-f_002d_002d_002daa fn f---aa
-formatting.html#index-f_002d_002d_002dbb-f_002d_002d_002dcc fn f---bb
-formatting.html#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff fn
f---ddd
-formatting.html#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll
fn f---ggg
+formatting.html#index-f_002d_002d_002dbb-f_002d_002d_002dcc fn f---bb,
f---cc
+formatting.html#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff fn
f---ddd, f---eee, ffff
+formatting.html#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll
fn f---ggg, f---hhh fjjj, f---kkk, f---lll
formatting.html#index-copying-followed fn followed
formatting.html#index-copying-followed-1 fn followed
formatting.html#index-titlepage-followed fn followed
@@ -359,7 +359,7 @@ formatting.html#index-truc fn truc
formatting.html#index-truc-1 fn truc
formatting.html#index-truc-2 fn truc
formatting.html#index-truc-3 fn truc
-formatting.html#index-xxx-zzz fn xxx
+formatting.html#index-xxx-zzz fn xxx, zzz
formatting.html#index-copying-d_002d_002deftp_005fname tp d--eftp_name
formatting.html#index-titlepage-d_002d_002deftp_005fname tp
d--eftp_name
formatting.html#index-d_002d_002deftp_005fname tp d--eftp_name
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/HTML.pm (output_internal_links): add subentries to index entries text.,
Patrice Dumas <=