[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch release/7.1 updated: * tp/Texinfo/Common.pm (move_index_entries_a
From: |
Gavin D. Smith |
Subject: |
branch release/7.1 updated: * tp/Texinfo/Common.pm (move_index_entries_after_items): consider a @subentry to be part of the moved index entries. Report from Thérèse Godefroy. |
Date: |
Tue, 08 Oct 2024 16:19:51 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch release/7.1
in repository texinfo.
The following commit(s) were added to refs/heads/release/7.1 by this push:
new d28094bc85 * tp/Texinfo/Common.pm (move_index_entries_after_items):
consider a @subentry to be part of the moved index entries. Report from Thérèse
Godefroy.
d28094bc85 is described below
commit d28094bc859b29459c84c821480cc123438e7584
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Oct 8 21:10:37 2024 +0100
* tp/Texinfo/Common.pm (move_index_entries_after_items):
consider a @subentry to be part of the moved index entries.
Report from Thérèse Godefroy.
* tp/t/index_before_item.t (subentry): add test with @subentry
in @cindex.
---
ChangeLog | 9 +++++++++
tp/Texinfo/Common.pm | 5 ++++-
tp/t/index_before_item.t | 15 ++++++++++++++-
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f0bd116e3c..4cbe9cbb05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-10-08 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Common.pm (move_index_entries_after_items):
+ consider a @subentry to be part of the moved index entries.
+ Report from Thérèse Godefroy.
+
+ * tp/t/index_before_item.t (subentry): add test with @subentry
+ in @cindex.
+
2024-09-21 Patrice Dumas <pertusus@free.fr>
* tp/t/formats_encodings.t (japanese_shift_jis): assume that test
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index d7b146bc9c..abc2b000af 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -2356,7 +2356,10 @@ sub move_index_entries_after_items($)
and
$previous_ending_container->{'contents'}->[-1]->{'type'} eq
'index_entry_command')
or
($previous_ending_container->{'contents'}->[-1]->{'cmdname'}
and
($previous_ending_container->{'contents'}->[-1]->{'cmdname'} eq 'c'
- or
$previous_ending_container->{'contents'}->[-1]->{'cmdname'} eq 'comment')))) {
+ or
$previous_ending_container->{'contents'}->[-1]->{'cmdname'} eq 'comment'
+ # subentry is not within the index entry in the tree
+ or
$previous_ending_container->{'contents'}->[-1]->{'cmdname'} eq 'subentry')
+ ))) {
unshift @gathered_index_entries, pop
@{$previous_ending_container->{'contents'}};
}
#print STDERR "Gathered: @gathered_index_entries\n";
diff --git a/tp/t/index_before_item.t b/tp/t/index_before_item.t
index 89a74df546..184b4ed389 100644
--- a/tp/t/index_before_item.t
+++ b/tp/t/index_before_item.t
@@ -5,7 +5,7 @@ use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
use Test::More;
-BEGIN { plan tests => 6; }
+BEGIN { plan tests => 7; }
use Texinfo::Parser qw(parse_texi_piece);
use Texinfo::Common qw(move_index_entries_after_items_in_tree);
@@ -164,3 +164,16 @@ run_test('@itemize i
@item e--mph item
@end itemize
', 'only comment');
+
+run_test('@enumerate
+@cindex pattern @subentry variable
+@item
+Set the variable
+@end enumerate
+', '@enumerate
+@item
+@cindex pattern @subentry variable
+Set the variable
+@end enumerate
+', 'subentry');
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch release/7.1 updated: * tp/Texinfo/Common.pm (move_index_entries_after_items): consider a @subentry to be part of the moved index entries. Report from Thérèse Godefroy.,
Gavin D. Smith <=