[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert):
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): collect index entry end line spaces, which is important to get space before @subentry. |
Date: |
Sat, 01 Oct 2022 08:59:19 -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 382cde5813 * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): collect
index entry end line spaces, which is important to get space before @subentry.
382cde5813 is described below
commit 382cde5813373ab9b35f7e4b6fbae162dddbe4c1
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Oct 1 14:59:08 2022 +0200
* tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): collect index
entry end line spaces, which is important to get space before
@subentry.
---
ChangeLog | 6 ++++++
tp/Texinfo/Convert/TexinfoMarkup.pm | 4 +++-
.../converters_tests/index_entry_in_preformatted.pl | 2 +-
.../misc_commands/comment_space_command_on_line.pl | 2 +-
tp/t/results/xtable/inter_item_commands_in_table.pl | 8 ++++----
tp/tests/layout/res_parser/formatting_xml/formatting.xml | 16 ++++++++--------
6 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index de42aa9c79..c8ad73fd9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-10-01 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): collect index
+ entry end line spaces, which is important to get space before
+ @subentry.
+
2022-10-01 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/Convert/LaTeX.pm (_latex_header): Load microtype package
diff --git a/tp/Texinfo/Convert/TexinfoMarkup.pm
b/tp/Texinfo/Convert/TexinfoMarkup.pm
index 5633d34ff5..4228cb088a 100644
--- a/tp/Texinfo/Convert/TexinfoMarkup.pm
+++ b/tp/Texinfo/Convert/TexinfoMarkup.pm
@@ -716,11 +716,13 @@ sub _convert($$;$)
push @$attribute, ['index',
$element->{'extra'}->{'index_entry'}->{'index_name'}];
push @$attribute, _leading_spaces_arg($element);
+ # this is important to get the spaces before a @subentry
+ my $end_line_spaces = _end_line_spaces($self, $element);
my $end_line = $self->format_comment_or_return_end_line($element);
return $self->txi_markup_open_element($format_element, $attribute)
.$self->_index_entry($element)
- .$self->txi_markup_close_element($format_element)
+ .$self->txi_markup_close_element($format_element).$end_line_spaces
.${end_line};
} elsif (exists($line_commands{$element->{'cmdname'}})) {
my $cmdname = $element->{'cmdname'};
diff --git a/tp/t/results/converters_tests/index_entry_in_preformatted.pl
b/tp/t/results/converters_tests/index_entry_in_preformatted.pl
index 0655b17cce..89ff3f1002 100644
--- a/tp/t/results/converters_tests/index_entry_in_preformatted.pl
+++ b/tp/t/results/converters_tests/index_entry_in_preformatted.pl
@@ -615,7 +615,7 @@ $result_converted{'xml'}->{'index_entry_in_preformatted'} =
'<node name="Top" sp
<pre xml:space="preserve"><cindex index="cp" spaces=" "><indexterm index="cp"
number="1">first</indexterm></cindex>
text
-<cindex index="cp" spaces=" "><indexterm index="cp"
number="2">other</indexterm></cindex><!-- c comment -->
+<cindex index="cp" spaces=" "><indexterm index="cp"
number="2">other</indexterm></cindex> <!-- c comment -->
text2
<cindex index="cp" spaces=" "><indexterm index="cp"
number="3">last</indexterm></cindex>
</pre></example>
diff --git a/tp/t/results/misc_commands/comment_space_command_on_line.pl
b/tp/t/results/misc_commands/comment_space_command_on_line.pl
index 5e31028257..aa6eb8837a 100644
--- a/tp/t/results/misc_commands/comment_space_command_on_line.pl
+++ b/tp/t/results/misc_commands/comment_space_command_on_line.pl
@@ -1277,7 +1277,7 @@
$result_converted{'xml'}->{'comment_space_command_on_line'} = '<settitle spaces=
<microtype spaces=" " value="off" line="off@c comment
microtype"></microtype><!-- c comment microtype -->
-<cindex index="cp" spaces=" "><indexterm index="cp" number="1">index entry
<spacecmd type="spc"/></indexterm></cindex><!-- c index entry -->
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">index entry
<spacecmd type="spc"/></indexterm></cindex> <!-- c index entry -->
<heading spaces=" ">Heading <spacecmd type="spc"/> </heading><!-- c heading
-->
diff --git a/tp/t/results/xtable/inter_item_commands_in_table.pl
b/tp/t/results/xtable/inter_item_commands_in_table.pl
index abb8765110..c286d81892 100644
--- a/tp/t/results/xtable/inter_item_commands_in_table.pl
+++ b/tp/t/results/xtable/inter_item_commands_in_table.pl
@@ -3254,27 +3254,27 @@
$result_converted{'xml'}->{'inter_item_commands_in_table'} = '<node name="Top" s
</tableitem></tableentry></ftable>
<table commandarg="code" spaces=" " endspaces=" ">
-<beforefirstitem><cindex index="cp" spaces=" "><indexterm index="cp"
number="2">cindex in table</indexterm></cindex>
+<beforefirstitem><cindex index="cp" spaces=" "><indexterm index="cp"
number="2">cindex in table</indexterm></cindex>
<!-- c comment in table -->
</beforefirstitem><tableentry><tableterm><item spaces=" "><itemformat
command="code">abb</itemformat></item>
</tableterm><tableitem><para>l&textndash;ine
</para></tableitem></tableentry></table>
<table commandarg="code" spaces=" " endspaces=" ">
-<beforefirstitem><cindex index="cp" spaces=" "><indexterm index="cp"
number="3">cindex in table</indexterm></cindex>
+<beforefirstitem><cindex index="cp" spaces=" "><indexterm index="cp"
number="3">cindex in table</indexterm></cindex>
<para>Texte before first item.
</para></beforefirstitem><tableentry><tableterm><item spaces=" "><itemformat
command="code">abb</itemformat></item>
</tableterm></tableentry></table>
<table commandarg="samp" spaces=" " endspaces=" ">
-<beforefirstitem><cindex index="cp" spaces=" "><indexterm index="cp"
number="4">samp cindex in table</indexterm></cindex>
+<beforefirstitem><cindex index="cp" spaces=" "><indexterm index="cp"
number="4">samp cindex in table</indexterm></cindex>
<!-- c samp comment in table -->
</beforefirstitem><tableentry><tableterm><item spaces=" "><itemformat
command="samp">asamp--bb</itemformat></item>
</tableterm><tableitem><para>l&textndash;ine samp
</para></tableitem></tableentry></table>
<table commandarg="samp" spaces=" " endspaces=" ">
-<beforefirstitem><cindex index="cp" spaces=" "><indexterm index="cp"
number="5">samp cindex in table</indexterm></cindex>
+<beforefirstitem><cindex index="cp" spaces=" "><indexterm index="cp"
number="5">samp cindex in table</indexterm></cindex>
<para>Texte before first item samp.
</para></beforefirstitem><tableentry><tableterm><item spaces=" "><itemformat
command="samp">asamp--bb</itemformat></item>
</tableterm></tableentry></table>
diff --git a/tp/tests/layout/res_parser/formatting_xml/formatting.xml
b/tp/tests/layout/res_parser/formatting_xml/formatting.xml
index 6ec62daef4..9fd52e7687 100644
--- a/tp/tests/layout/res_parser/formatting_xml/formatting.xml
+++ b/tp/tests/layout/res_parser/formatting_xml/formatting.xml
@@ -5801,12 +5801,12 @@ Various deff lines
<findex index="fn" spaces=" "><indexterm index="fn"
number="213">a</indexterm></findex>
<cindex index="cp" spaces=" "><indexterm index="cp"
number="34">a&textmdash;a</indexterm></cindex>
-<cindex index="cp" spaces=" "><indexterm index="cp"
number="35">b&textmdash;b</indexterm></cindex><subentry spaces="
">c&textmdash;c</subentry>
-<cindex index="cp" spaces=" "><indexterm index="cp"
number="36">d&textmdash;dd</indexterm></cindex><subentry spaces="
">e&textmdash;ee </subentry><subentry spaces=" ">f&textmdash;ff</subentry>
+<cindex index="cp" spaces=" "><indexterm index="cp"
number="35">b&textmdash;b</indexterm></cindex> <subentry spaces="
">c&textmdash;c</subentry>
+<cindex index="cp" spaces=" "><indexterm index="cp"
number="36">d&textmdash;dd</indexterm></cindex> <subentry spaces="
">e&textmdash;ee </subentry><subentry spaces=" ">f&textmdash;ff</subentry>
<findex index="fn" spaces=" "><indexterm index="fn"
number="214">f---aa</indexterm></findex>
-<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>
+<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="38">ddd
<seealso>ccc</seealso></indexterm></cindex>
@@ -5814,9 +5814,9 @@ Various deff lines
<findex index="fn" spaces=" "><indexterm index="fn" number="217">f---aaa
<seeentry>f---bbb</seeentry></indexterm></findex>
<findex index="fn" spaces=" "><indexterm index="fn" number="218">f---ddd
<seealso>f---ccc</seealso></indexterm></findex>
-<cindex index="cp" spaces=" "><indexterm index="cp" number="39">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="39">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="219">xxx
<sortas>X---S</sortas></indexterm></findex><subentry spaces="
"><sortas>X&textmdash;S1</sortas> zzz</subentry>
+<findex index="fn" spaces=" "><indexterm index="fn" number="219">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="220"><w></w></indexterm></findex>
@@ -5826,9 +5826,9 @@ Various deff lines
<indexcommand command="trucindex" index="truc" spaces=" "><indexterm
index="truc" number="1" incode="0">truc</indexterm></indexcommand>
<!-- c error with texindex: Bad entry; expected 3 to 5 fields, not 6 -->
-<cindex index="cp" spaces=" "><indexterm index="cp"
number="40">g&textmdash;gg</indexterm></cindex><subentry spaces="
">h&textmdash;hh jjj </subentry><subentry spaces=" ">k&textmdash;kk
</subentry><subentry spaces=" ">l&textmdash;ll</subentry>
+<cindex index="cp" spaces=" "><indexterm index="cp"
number="40">g&textmdash;gg</indexterm></cindex> <subentry spaces="
">h&textmdash;hh jjj </subentry><subentry spaces=" ">k&textmdash;kk
</subentry><subentry spaces=" ">l&textmdash;ll</subentry>
-<findex index="fn" spaces=" "><indexterm index="fn"
number="221">f---ggg</indexterm></findex><subentry spaces=" ">f&textmdash;hhh
fjjj </subentry><subentry spaces=" ">f&textmdash;kkk </subentry><subentry
spaces=" ">f&textmdash;lll</subentry>
+<findex index="fn" spaces=" "><indexterm index="fn"
number="221">f---ggg</indexterm></findex> <subentry spaces=" ">f&textmdash;hhh
fjjj </subentry><subentry spaces=" ">f&textmdash;kkk </subentry><subentry
spaces=" ">f&textmdash;lll</subentry>
<!-- c incorrect order. Cryptic error in TeX -->
<!-- c File ended while scanning use of @initialx. -->
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): collect index entry end line spaces, which is important to get space before @subentry.,
Patrice Dumas <=