[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/ParserNonXS.pm (_handle_close_brace)
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/ParserNonXS.pm (_handle_close_brace), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): asociate seealso and seeentry to the main index entry only, not to @subentry. |
Date: |
Sun, 07 Jan 2024 10:37:06 -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 7ebec13052 * tp/Texinfo/ParserNonXS.pm (_handle_close_brace),
tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): asociate seealso and
seeentry to the main index entry only, not to @subentry.
7ebec13052 is described below
commit 7ebec13052f52c46187f1ff87e8625bc0226d0e4
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 7 16:37:07 2024 +0100
* tp/Texinfo/ParserNonXS.pm (_handle_close_brace),
tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): asociate
seealso and seeentry to the main index entry only, not to @subentry.
---
ChangeLog | 6 ++++++
tp/Texinfo/ParserNonXS.pm | 12 +++++++-----
tp/Texinfo/XS/parsetexi/separator.c | 7 +++++--
tp/t/results/indices/double_seeentry_seealso.pl | 2 --
tp/t/results/indices/seealso_duplicate.pl | 4 ----
tp/t/results/latex_tests/indices.pl | 2 --
tp/t/results/latex_tests/indices_disable_encoding.pl | 2 --
7 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 64c4c3e960..22dd078b36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-01-07 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/ParserNonXS.pm (_handle_close_brace),
+ tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): asociate
+ seealso and seeentry to the main index entry only, not to @subentry.
+
2024-01-07 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/ParserNonXS.pm
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 933cf0d2a9..c4f30538f1 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -6373,11 +6373,13 @@ sub _handle_close_brace($$$)
$index_element->{'extra'} = {}
if (!defined($index_element->{'extra'}));
$index_element->{'extra'}->{$command} = $current->{'parent'};
- if ($index_element ne $subindex_element) {
- $subindex_element->{'extra'} = {}
- if (!defined($subindex_element->{'extra'}));
- $subindex_element->{'extra'}->{$command} = $current->{'parent'};
- }
+ # Following should be uncommented association to the subentry is
+ # wanted
+ #if ($index_element ne $subindex_element) {
+ # $subindex_element->{'extra'} = {}
+ # if (!defined($subindex_element->{'extra'}));
+ # $subindex_element->{'extra'}->{$command} = $current->{'parent'};
+ #}
}
}
}
diff --git a/tp/Texinfo/XS/parsetexi/separator.c
b/tp/Texinfo/XS/parsetexi/separator.c
index 41c2246395..8ff91dad9a 100644
--- a/tp/Texinfo/XS/parsetexi/separator.c
+++ b/tp/Texinfo/XS/parsetexi/separator.c
@@ -555,13 +555,16 @@ handle_close_brace (ELEMENT *current, char **line_inout)
else
index_elt = subentry_parent;
}
- add_extra_element (subindex_elt,
+ add_extra_element (index_elt,
command_name(current->parent->cmd),
current->parent);
+ /* Following should be uncommented association to the subentry is
+ wanted
if (index_elt != subindex_elt)
- add_extra_element (index_elt,
+ add_extra_element (subindex_elt,
command_name(current->parent->cmd),
current->parent);
+ */
}
}
}
diff --git a/tp/t/results/indices/double_seeentry_seealso.pl
b/tp/t/results/indices/double_seeentry_seealso.pl
index 05ff9187d8..88b2daca01 100644
--- a/tp/t/results/indices/double_seeentry_seealso.pl
+++ b/tp/t/results/indices/double_seeentry_seealso.pl
@@ -447,7 +447,6 @@ $result_trees{'double_seeentry_seealso'} = {
'cmdname' => 'subentry',
'extra' => {
'level' => 1,
- 'seeentry' => {},
'subentry_parent' => {}
},
'info' => {
@@ -535,7 +534,6 @@
$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[3]{'extra'}{
$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[4]{'extra'}{'element_node'}
= $result_trees{'double_seeentry_seealso'}{'contents'}[3];
$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[4]{'extra'}{'seealso'}
=
$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0];
$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[4]{'extra'}{'subentry'}{'args'}[0]{'contents'}[2]
=
$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[4]{'extra'}{'seeentry'};
-$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[4]{'extra'}{'subentry'}{'extra'}{'seeentry'}
=
$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[4]{'extra'}{'seeentry'};
$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[4]{'extra'}{'subentry'}{'extra'}{'subentry_parent'}
= $result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[4];
$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[5] =
$result_trees{'double_seeentry_seealso'}{'contents'}[4]{'contents'}[4]{'extra'}{'subentry'};
diff --git a/tp/t/results/indices/seealso_duplicate.pl
b/tp/t/results/indices/seealso_duplicate.pl
index 76679a9455..93171be365 100644
--- a/tp/t/results/indices/seealso_duplicate.pl
+++ b/tp/t/results/indices/seealso_duplicate.pl
@@ -243,7 +243,6 @@ $result_trees{'seealso_duplicate'} = {
'cmdname' => 'subentry',
'extra' => {
'level' => 1,
- 'seealso' => {},
'subentry_parent' => {}
},
'info' => {
@@ -378,7 +377,6 @@ $result_trees{'seealso_duplicate'} = {
'cmdname' => 'subentry',
'extra' => {
'level' => 1,
- 'seeentry' => {},
'subentry_parent' => {}
},
'info' => {
@@ -463,12 +461,10 @@
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[1]{'extra'}{'suben
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[2] =
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[1]{'extra'}{'subentry'};
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[3]{'extra'}{'element_node'}
= $result_trees{'seealso_duplicate'}{'contents'}[2];
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[3]{'extra'}{'subentry'}{'args'}[0]{'contents'}[2]
=
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[3]{'extra'}{'seealso'};
-$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[3]{'extra'}{'subentry'}{'extra'}{'seealso'}
=
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[3]{'extra'}{'seealso'};
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[3]{'extra'}{'subentry'}{'extra'}{'subentry_parent'}
= $result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[3];
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[4] =
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[3]{'extra'}{'subentry'};
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[10]{'extra'}{'element_node'}
= $result_trees{'seealso_duplicate'}{'contents'}[2];
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[10]{'extra'}{'subentry'}{'args'}[0]{'contents'}[2]
=
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[10]{'extra'}{'seeentry'};
-$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[10]{'extra'}{'subentry'}{'extra'}{'seeentry'}
=
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[10]{'extra'}{'seeentry'};
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[10]{'extra'}{'subentry'}{'extra'}{'subentry_parent'}
= $result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[10];
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[11] =
$result_trees{'seealso_duplicate'}{'contents'}[2]{'contents'}[10]{'extra'}{'subentry'};
diff --git a/tp/t/results/latex_tests/indices.pl
b/tp/t/results/latex_tests/indices.pl
index 6a7bf1eeb3..5d1925497c 100644
--- a/tp/t/results/latex_tests/indices.pl
+++ b/tp/t/results/latex_tests/indices.pl
@@ -726,7 +726,6 @@ $result_trees{'indices'} = {
'cmdname' => 'subentry',
'extra' => {
'level' => 1,
- 'seealso' => {},
'sortas' => 'a!"@b',
'subentry_parent' => {}
},
@@ -1105,7 +1104,6 @@
$result_trees{'indices'}{'contents'}[4]{'contents'}[5]{'extra'}{'element_node'}
$result_trees{'indices'}{'contents'}[4]{'contents'}[6]{'extra'}{'element_node'}
= $result_trees{'indices'}{'contents'}[3];
$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'element_node'}
= $result_trees{'indices'}{'contents'}[3];
$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'args'}[0]{'contents'}[11]
= $result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'seealso'};
-$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'extra'}{'seealso'}
= $result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'seealso'};
$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'extra'}{'subentry_parent'}
= $result_trees{'indices'}{'contents'}[4]{'contents'}[8];
$result_trees{'indices'}{'contents'}[4]{'contents'}[9] =
$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'};
$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'extra'}{'element_node'}
= $result_trees{'indices'}{'contents'}[3];
diff --git a/tp/t/results/latex_tests/indices_disable_encoding.pl
b/tp/t/results/latex_tests/indices_disable_encoding.pl
index d930414120..c0505c50ee 100644
--- a/tp/t/results/latex_tests/indices_disable_encoding.pl
+++ b/tp/t/results/latex_tests/indices_disable_encoding.pl
@@ -726,7 +726,6 @@ $result_trees{'indices_disable_encoding'} = {
'cmdname' => 'subentry',
'extra' => {
'level' => 1,
- 'seealso' => {},
'sortas' => 'a!"@b',
'subentry_parent' => {}
},
@@ -1105,7 +1104,6 @@
$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[5]{'extra'}
$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[6]{'extra'}{'element_node'}
= $result_trees{'indices_disable_encoding'}{'contents'}[3];
$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[8]{'extra'}{'element_node'}
= $result_trees{'indices_disable_encoding'}{'contents'}[3];
$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'args'}[0]{'contents'}[11]
=
$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[8]{'extra'}{'seealso'};
-$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'extra'}{'seealso'}
=
$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[8]{'extra'}{'seealso'};
$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'extra'}{'subentry_parent'}
= $result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[8];
$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[9] =
$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'};
$result_trees{'indices_disable_encoding'}{'contents'}[4]{'contents'}[10]{'extra'}{'element_node'}
= $result_trees{'indices_disable_encoding'}{'contents'}[3];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/ParserNonXS.pm (_handle_close_brace), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): asociate seealso and seeentry to the main index entry only, not to @subentry.,
Patrice Dumas <=