[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Use spaces_at_end for spaces before @-command in
From: |
Patrice Dumas |
Subject: |
branch master updated: Use spaces_at_end for spaces before @-command in index entry |
Date: |
Sat, 03 Sep 2022 11:45:07 -0400 |
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 3ecc167629 Use spaces_at_end for spaces before @-command in index entry
3ecc167629 is described below
commit 3ecc167629c5baaa8b5c4cf5b91d290e74dfadb8
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Sep 3 16:41:21 2022 +0200
Use spaces_at_end for spaces before @-command in index entry
* tp/Texinfo/ParserNonXS.pm (_parse_texi),
tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
use spaces_at_end type for space before @sortas, @subentry and
similar @-comands on index @-comand lines.
---
ChangeLog | 9 +++++++++
tp/Texinfo/ParserNonXS.pm | 12 +++++++-----
tp/Texinfo/XS/parsetexi/parser.c | 2 +-
tp/t/results/indices/double_seeentry_seealso.pl | 12 ++++++------
tp/t/results/indices/explicit_sort_key.pl | 8 ++++----
.../indices/multiple_index_text_sortas_seeentry_seealso.pl | 8 ++++----
tp/t/results/indices/seealso_duplicate.pl | 2 +-
tp/t/results/indices/seeentry.pl | 4 ++--
tp/t/results/indices/subentry_and_sortas.pl | 4 ++--
tp/t/results/latex_tests/indices.pl | 4 ++--
tp/tests/layout/res_parser/formatting_xml/formatting.xml | 12 ++++++------
11 files changed, 44 insertions(+), 33 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c7b85acafb..97d09d8216 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-09-03 Patrice Dumas <pertusus@free.fr>
+
+ Use spaces_at_end for spaces before @-command in index entry
+
+ * tp/Texinfo/ParserNonXS.pm (_parse_texi),
+ tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
+ use spaces_at_end type for space before @sortas, @subentry and
+ similar @-command on index @-command lines.
+
2022-09-03 Gavin Smith <gavinsmith0123@gmail.com>
* doc/texinfo.tex (\headitem): Do not call \checkenv as
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 13e949d750..682f7dc6aa 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -3239,7 +3239,8 @@ sub _end_line($$$)
my $misc_cmd = $current;
my $command = $current->{'cmdname'};
my $end_command;
- print STDERR "MISC END \@$command\n" if ($self->{'DEBUG'});
+ print STDERR "MISC END \@$command: $self->{'line_commands'}->{$command}\n"
+ if ($self->{'DEBUG'});
if ($self->{'line_commands'}->{$command} =~ /^\d$/) {
my $args = _parse_line_command_args($self, $current, $source_info);
@@ -4109,7 +4110,7 @@ sub _parse_texi($$$)
my ($at_command, $open_brace, $asterisk, $single_letter_command,
$separator_match, $misc_text) = @line_parsing;
print STDERR "PARSED: ".join(', ', map {!defined($_) ? 'UNDEF' : "'$_'"}
@line_parsing)."\n"
- if ($self->{'DEBUG'});
+ if ($self->{'DEBUG'} and $self->{'DEBUG'} > 3);
my $command;
if ($single_letter_command) {
@@ -4558,10 +4559,10 @@ sub _parse_texi($$$)
if ($1 ne '') {
if ($current->{'contents'}->[-1]->{'text'} eq '') {
$current->{'contents'}->[-1]->{'text'} = $1;
- $current->{'contents'}->[-1]->{'type'} =
'empty_spaces_before_argument';
+ $current->{'contents'}->[-1]->{'type'} = 'spaces_at_end';
} else {
my $new_spaces = { 'text' => $1, 'parent' => $current,
- 'type' => 'empty_spaces_before_argument' };
+ 'type' => 'spaces_at_end' };
push @{$current->{'contents'}}, $new_spaces;
}
}
@@ -7014,7 +7015,8 @@ C<@verb>, C<@html>, C<@macro> body).
=item spaces_at_end
-Space at the end of an argument to a line command, or at the end of
+Space at the end of an argument to a line command, within an index @-command
+before an @-command interrupting the index command, or at the end of
bracketed content on a C<@multitable> line or definition line.
=item text_before_beginning
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index 18d0afd09c..8c79b7a09d 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -1787,7 +1787,7 @@ value_invalid:
&& current->contents.number > 0
&& last_contents_child(current)->text.end > 0)
{
- isolate_trailing_space (current, ET_empty_spaces_before_argument);
+ isolate_trailing_space (current, ET_spaces_at_end);
}
if (cmd == CM_item && item_line_parent (current))
diff --git a/tp/t/results/indices/double_seeentry_seealso.pl
b/tp/t/results/indices/double_seeentry_seealso.pl
index 8fa0025c6b..bd93258535 100644
--- a/tp/t/results/indices/double_seeentry_seealso.pl
+++ b/tp/t/results/indices/double_seeentry_seealso.pl
@@ -173,7 +173,7 @@ $result_trees{'double_seeentry_seealso'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -200,7 +200,7 @@ $result_trees{'double_seeentry_seealso'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -295,7 +295,7 @@ $result_trees{'double_seeentry_seealso'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -363,7 +363,7 @@ $result_trees{'double_seeentry_seealso'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -390,7 +390,7 @@ $result_trees{'double_seeentry_seealso'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -508,7 +508,7 @@ $result_trees{'double_seeentry_seealso'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
diff --git a/tp/t/results/indices/explicit_sort_key.pl
b/tp/t/results/indices/explicit_sort_key.pl
index 60ec9fa7e0..2d9c2328c9 100644
--- a/tp/t/results/indices/explicit_sort_key.pl
+++ b/tp/t/results/indices/explicit_sort_key.pl
@@ -375,7 +375,7 @@ $result_trees{'explicit_sort_key'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -461,7 +461,7 @@ $result_trees{'explicit_sort_key'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -500,7 +500,7 @@ $result_trees{'explicit_sort_key'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -615,7 +615,7 @@ $result_trees{'explicit_sort_key'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
diff --git
a/tp/t/results/indices/multiple_index_text_sortas_seeentry_seealso.pl
b/tp/t/results/indices/multiple_index_text_sortas_seeentry_seealso.pl
index f198a240a1..653415d59b 100644
--- a/tp/t/results/indices/multiple_index_text_sortas_seeentry_seealso.pl
+++ b/tp/t/results/indices/multiple_index_text_sortas_seeentry_seealso.pl
@@ -166,7 +166,7 @@
$result_trees{'multiple_index_text_sortas_seeentry_seealso'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -202,7 +202,7 @@
$result_trees{'multiple_index_text_sortas_seeentry_seealso'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -238,7 +238,7 @@
$result_trees{'multiple_index_text_sortas_seeentry_seealso'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -309,7 +309,7 @@
$result_trees{'multiple_index_text_sortas_seeentry_seealso'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
diff --git a/tp/t/results/indices/seealso_duplicate.pl
b/tp/t/results/indices/seealso_duplicate.pl
index cb0cb0847d..4e3a81fd41 100644
--- a/tp/t/results/indices/seealso_duplicate.pl
+++ b/tp/t/results/indices/seealso_duplicate.pl
@@ -191,7 +191,7 @@ $result_trees{'seealso_duplicate'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
diff --git a/tp/t/results/indices/seeentry.pl b/tp/t/results/indices/seeentry.pl
index b4ccd80075..801874b332 100644
--- a/tp/t/results/indices/seeentry.pl
+++ b/tp/t/results/indices/seeentry.pl
@@ -166,7 +166,7 @@ $result_trees{'seeentry'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -308,7 +308,7 @@ $result_trees{'seeentry'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
diff --git a/tp/t/results/indices/subentry_and_sortas.pl
b/tp/t/results/indices/subentry_and_sortas.pl
index 414e1f5b40..6cb44756ef 100644
--- a/tp/t/results/indices/subentry_and_sortas.pl
+++ b/tp/t/results/indices/subentry_and_sortas.pl
@@ -166,7 +166,7 @@ $result_trees{'subentry_and_sortas'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -299,7 +299,7 @@ $result_trees{'subentry_and_sortas'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
diff --git a/tp/t/results/latex_tests/indices.pl
b/tp/t/results/latex_tests/indices.pl
index 6e9f021e6a..7a1ccae29a 100644
--- a/tp/t/results/latex_tests/indices.pl
+++ b/tp/t/results/latex_tests/indices.pl
@@ -460,7 +460,7 @@ $result_trees{'indices'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
@@ -657,7 +657,7 @@ $result_trees{'indices'} = {
{
'parent' => {},
'text' => ' ',
- 'type' => 'empty_spaces_before_argument'
+ 'type' => 'spaces_at_end'
},
{
'args' => [
diff --git a/tp/tests/layout/res_parser/formatting_xml/formatting.xml
b/tp/tests/layout/res_parser/formatting_xml/formatting.xml
index 580a666a8b..15417765c4 100644
--- a/tp/tests/layout/res_parser/formatting_xml/formatting.xml
+++ b/tp/tests/layout/res_parser/formatting_xml/formatting.xml
@@ -5808,15 +5808,15 @@ Various deff lines
<findex index="fn" spaces=" "><indexterm index="fn"
number="215">f---bb</indexterm></findex><subentry spaces="
">f&textmdash;cc</subentry>
<findex index="fn" spaces=" "><indexterm index="fn"
number="216">f---ddd</indexterm></findex><subentry spaces=" ">f&textmdash;eee
</subentry><subentry spaces=" ">ffff</subentry>
-<cindex index="cp" spaces=" "><indexterm index="cp"
number="37">aaa<seeentry>bbb</seeentry></indexterm></cindex>
-<cindex index="cp" spaces=" "><indexterm index="cp"
number="37">ddd<seealso>ccc</seealso></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="37">aaa
<seeentry>bbb</seeentry></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="37">ddd
<seealso>ccc</seealso></indexterm></cindex>
-<findex index="fn" spaces=" "><indexterm index="fn"
number="217">f&textmdash;aaa<seeentry>f&textmdash;bbb</seeentry></indexterm></findex>
-<findex index="fn" spaces=" "><indexterm index="fn"
number="217">f&textmdash;ddd<seealso>f&textmdash;ccc</seealso></indexterm></findex>
+<findex index="fn" spaces=" "><indexterm index="fn"
number="217">f&textmdash;aaa
<seeentry>f&textmdash;bbb</seeentry></indexterm></findex>
+<findex index="fn" spaces=" "><indexterm index="fn"
number="217">f&textmdash;ddd
<seealso>f&textmdash;ccc</seealso></indexterm></findex>
-<cindex index="cp" spaces=" "><indexterm index="cp"
number="37">aaa<sortas>A&textmdash;S</sortas></indexterm></cindex><subentry
spaces=" "><sortas>B&textmdash;S1</sortas> bbb</subentry>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="37">aaa
<sortas>A&textmdash;S</sortas></indexterm></cindex><subentry spaces="
"><sortas>B&textmdash;S1</sortas> bbb</subentry>
-<findex index="fn" spaces=" "><indexterm index="fn"
number="217">xxx<sortas>X---S</sortas></indexterm></findex><subentry spaces="
"><sortas>X&textmdash;S1</sortas> zzz</subentry>
+<findex index="fn" spaces=" "><indexterm index="fn" number="217">xxx
<sortas>X---S</sortas></indexterm></findex><subentry spaces="
"><sortas>X&textmdash;S1</sortas> zzz</subentry>
<cindex></cindex>
<findex index="fn" spaces=" "><indexterm index="fn"
number="218"><w></w></indexterm></findex>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Use spaces_at_end for spaces before @-command in index entry,
Patrice Dumas <=