[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Converter.pm (comma_index_su
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Converter.pm (comma_index_subentries_tree), tp/Texinfo/Convert/HTML.pm (_prepare_index_entries): use subentries to determine the identifier of an index entry. Add an optional separator argument to comma_index_subentries_tree() to be able to use something else than a comma. Use a space separator to determine the identifier to keep it shorter. |
Date: |
Sat, 19 Nov 2022 13:12:29 -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 ed1c86ee3e * tp/Texinfo/Convert/Converter.pm
(comma_index_subentries_tree), tp/Texinfo/Convert/HTML.pm
(_prepare_index_entries): use subentries to determine the identifier of an
index entry. Add an optional separator argument to
comma_index_subentries_tree() to be able to use something else than a comma.
Use a space separator to determine the identifier to keep it shorter.
ed1c86ee3e is described below
commit ed1c86ee3e42e71a07863c19fdcce8d681d0518e
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Nov 19 19:12:16 2022 +0100
* tp/Texinfo/Convert/Converter.pm (comma_index_subentries_tree),
tp/Texinfo/Convert/HTML.pm (_prepare_index_entries): use subentries
to determine the identifier of an index entry. Add an optional
separator argument to comma_index_subentries_tree() to be able to
use something else than a comma. Use a space separator to determine
the identifier to keep it shorter.
---
ChangeLog | 9 +++
tp/TODO | 3 +-
tp/Texinfo/Convert/Converter.pm | 17 +++---
tp/Texinfo/Convert/HTML.pm | 6 ++
tp/t/results/indices/seealso_duplicate.pl | 8 +--
tp/t/results/indices/sorted_subentries.pl | 70 +++++++++++-----------
tp/t/results/indices/subentries.pl | 24 ++++----
tp/t/results/indices/subentry_and_sortas.pl | 8 +--
tp/t/results/indices/subentry_and_sortas_spaces.pl | 16 ++---
.../layout/res_parser/formatting/formatting.html | 48 +++++++--------
.../formatting/internal_links_formatting.txt | 16 ++---
.../layout/res_parser/formatting_chm/chapter.html | 32 +++++-----
.../layout/res_parser/formatting_chm/chapter2.html | 16 ++---
.../res_parser/formatting_chm/formatting.hhk | 16 ++---
.../formatting_enable_encoding/formatting.html | 48 +++++++--------
.../EPUB/xhtml/chapter.xhtml | 32 +++++-----
.../EPUB/xhtml/chapter2.xhtml | 16 ++---
.../EPUB/xhtml/chapter.xhtml | 32 +++++-----
.../EPUB/xhtml/chapter2.xhtml | 16 ++---
.../res_parser/formatting_exotic/chapter.html | 32 +++++-----
.../res_parser/formatting_exotic/chapter2.html | 16 ++---
.../res_parser/formatting_fr_icons/formatting.html | 48 +++++++--------
.../res_parser/formatting_html/formatting.html | 48 +++++++--------
.../res_parser/formatting_html32/formatting.html | 48 +++++++--------
.../formatting_html_no_texi2html/formatting.html | 48 +++++++--------
.../res_parser/formatting_html_nodes/chapter.html | 32 +++++-----
.../res_parser/formatting_html_nodes/chapter2.html | 16 ++---
.../formatting_inline_css/formatting.html | 48 +++++++--------
.../res_parser/formatting_mathjax/formatting.html | 48 +++++++--------
.../res_parser/formatting_nodes/chapter.html | 32 +++++-----
.../res_parser/formatting_nodes/chapter2.html | 16 ++---
.../formatting_numerical_entities/formatting.html | 48 +++++++--------
.../formatting_sort_element_counts/formatting.html | 48 +++++++--------
.../formatting_weird_quotes/formatting.html | 48 +++++++--------
.../res_parser/formatting_xhtml/formatting.html | 48 +++++++--------
.../res_parser/formatting_singular/chapter.html | 32 +++++-----
.../res_parser/formatting_singular/chapter2.html | 16 ++---
37 files changed, 561 insertions(+), 544 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e0cbb3242e..5f11991e5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-11-19 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/Converter.pm (comma_index_subentries_tree),
+ tp/Texinfo/Convert/HTML.pm (_prepare_index_entries): use subentries
+ to determine the identifier of an index entry. Add an optional
+ separator argument to comma_index_subentries_tree() to be able to
+ use something else than a comma. Use a space separator to determine
+ the identifier to keep it shorter.
+
2022-11-19 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/HTML.pm (%css_element_class_styles): use
diff --git a/tp/TODO b/tp/TODO
index f4769458e1..4be0d894b9 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -10,8 +10,7 @@ This is the todo list for texi2any
Before next release
===================
-Check in string documents, determine if a context is better or a comment
-using the -c option of xgettext.
+internal_links_formatting @subentry handling
Bugs
====
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index cc63b188ec..484a3a09a1 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -1393,14 +1393,16 @@ sub convert_accents($$$;$)
}
}
-# index sub-entries specified with @subentry, separated by commas.
+# index sub-entries specified with @subentry, separated by commas, or by
+# $SEPARATOR, if set
sub comma_index_subentries_tree {
- my ($self, $current_entry) = @_;
+ my ($self, $current_entry, $separator) = @_;
+ $separator = ', ' if (!defined($separator));
my @contents;
while ($current_entry->{'extra'} and
$current_entry->{'extra'}->{'subentry'}) {
$current_entry = $current_entry->{'extra'}->{'subentry'};
- push @contents, {'text' => ', '}, $current_entry->{'args'}->[0];
+ push @contents, {'text' => $separator}, $current_entry->{'args'}->[0];
}
if (scalar(@contents)) {
return {'contents' => \@contents};
@@ -1964,13 +1966,14 @@ see L<Texinfo::Convert::Utils>.
=over
-=item $contents_array = $converter->comma_index_subentries_tree($entry)
+=item $contents_element = $converter->comma_index_subentries_tree($entry,
$separator)
X<C<comma_index_subentries_tree>>
I<$entry> is a Texinfo tree index entry element. The function sets up
-an array with the C<@subentry> contents, separated by commas. The
-array reference is returned as I<$contents_array>, or C<undef> if there
-is no such content.
+an array with the C<@subentry> contents. The result is returned as
+C<contents> in the I<$contents_element> element, or C<undef> if there is no
+such content. I<$separator> is an optional separator argument used, if given,
+instead of the default: a comma followed by a space.
=item $result = $converter->convert_accents($accent_command, \&format_accents,
$in_upper_case)
X<C<convert_accents>>
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 5b20ef3e93..257a456ae4 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -8991,6 +8991,12 @@ sub _prepare_index_entries($)
$region = "$index_entry->{'entry_region'}->{'cmdname'}-"
if (defined($index_entry->{'entry_region'}));
my @contents = @{$index_entry->{'content_normalized'}};
+ my $subentries_tree
+ = $self->comma_index_subentries_tree($index_entry->{'entry_element'},
+ ' ');
+ if (defined($subentries_tree)) {
+ push @contents, @{$subentries_tree->{'contents'}};
+ }
my $trimmed_contents
= Texinfo::Common::trim_spaces_comment_from_content(\@contents);
my $normalized_index =
diff --git a/tp/t/results/indices/seealso_duplicate.pl
b/tp/t/results/indices/seealso_duplicate.pl
index b0aaf78e3f..d33fd05e99 100644
--- a/tp/t/results/indices/seealso_duplicate.pl
+++ b/tp/t/results/indices/seealso_duplicate.pl
@@ -403,8 +403,8 @@ $result_converted{'plaintext'}->{'seealso_duplicate'} = '*
Menu:
$result_converted{'html_text'}->{'seealso_duplicate'} = '<h1 class="node"
id="Top">Top</h1>
-<a class="index-entry-id" id="index-awk"></a>
-<a class="index-entry-id" id="index-awk-1"></a>
+<a class="index-entry-id" id="index-awk-POSIX-and"></a>
+<a class="index-entry-id" id="index-awk-POSIX-and-1"></a>
<div class="printindex cp-printindex">
<table class="cp-entries-printindex" border="0">
@@ -412,8 +412,8 @@ $result_converted{'html_text'}->{'seealso_duplicate'} =
'<h1 class="node" id="To
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="t_i_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><code
class="command">awk</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a href="#index-awk">POSIX
and</a></span>:</td><td> </td><td class="printindex-index-section"><a
href="#Top">Top</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a href="#index-awk-1">POSIX
and</a></span>:</td><td> </td><td class="printindex-index-section"><a
href="#Top">Top</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a href="#index-awk-POSIX-and">POSIX
and</a></span>:</td><td> </td><td class="printindex-index-section"><a
href="#Top">Top</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a href="#index-awk-POSIX-and-1">POSIX
and</a></span>:</td><td> </td><td class="printindex-index-section"><a
href="#Top">Top</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
</div>
diff --git a/tp/t/results/indices/sorted_subentries.pl
b/tp/t/results/indices/sorted_subentries.pl
index 1794b53720..7488a83516 100644
--- a/tp/t/results/indices/sorted_subentries.pl
+++ b/tp/t/results/indices/sorted_subentries.pl
@@ -2260,18 +2260,18 @@ $result_converted{'html_text'}->{'sorted_subentries'} =
'<div class="top-level-e
</div>
<h2 class="chapter" id="one">1 one</h2>
-<a class="index-entry-id" id="index-aa"></a>
-<a class="index-entry-id" id="index-ab"></a>
-<a class="index-entry-id" id="index-aa-1"></a>
-<a class="index-entry-id" id="index-bb"></a>
+<a class="index-entry-id" id="index-aa-bb"></a>
+<a class="index-entry-id" id="index-ab-cc"></a>
+<a class="index-entry-id" id="index-aa-dd"></a>
+<a class="index-entry-id" id="index-bb-cc"></a>
-<a class="index-entry-id" id="index-hhh"></a>
-<a class="index-entry-id" id="index-hhh-1"></a>
+<a class="index-entry-id" id="index-hhh-jjj-lll"></a>
<a class="index-entry-id" id="index-hhh-jjj"></a>
-<a class="index-entry-id" id="index-hhh-2"></a>
-<a class="index-entry-id" id="index-hhh-3"></a>
-<a class="index-entry-id" id="index-hhh-4"></a>
-<a class="index-entry-id" id="index-hhh-5"></a>
+<a class="index-entry-id" id="index-hhh-jjj-1"></a>
+<a class="index-entry-id" id="index-hhh-k"></a>
+<a class="index-entry-id" id="index-hhh-"></a>
+<a class="index-entry-id" id="index-hhh"></a>
+<a class="index-entry-id" id="index-hhh-jjj-lll-ppp"></a>
<hr>
</div>
@@ -2281,13 +2281,13 @@ $result_converted{'html_text'}->{'sorted_subentries'} =
'<div class="top-level-e
[<a href="#chapter-second" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="chapter" id="second">2 second</h2>
-<a class="index-entry-id" id="index-hhh-6"></a>
-<a class="index-entry-id" id="index-hhh-7"></a>
-<a class="index-entry-id" id="index-hhh-8"></a>
-<a class="index-entry-id" id="index-hhh-9"></a>
-<a class="index-entry-id" id="index-hhh-10"></a>
-<a class="index-entry-id" id="index-hhh-11"></a>
-<a class="index-entry-id" id="index-hhh-12"></a>
+<a class="index-entry-id" id="index-hhh-jjj-lll-1"></a>
+<a class="index-entry-id" id="index-hhh-1"></a>
+<a class="index-entry-id" id="index-hhh-jjj-2"></a>
+<a class="index-entry-id" id="index-hhh-JJJ-jjj"></a>
+<a class="index-entry-id" id="index-hhh-jjj-lll-2"></a>
+<a class="index-entry-id" id="index-hhh-k-nnn"></a>
+<a class="index-entry-id" id="index-hhh-l-third"></a>
<div class="printindex cp-printindex">
<table class="cp-letters-header-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#t_i_cp_letter-A"><b>A</b></a>
@@ -2302,31 +2302,31 @@ $result_converted{'html_text'}->{'sorted_subentries'} =
'<div class="top-level-e
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="t_i_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry">aa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aa">bb</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aa-1">dd</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aa-bb">bb</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aa-dd">dd</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
<tr><td></td><td class="printindex-index-entry">ab</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-ab">cc</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-ab-cc">cc</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="t_i_cp_letter-B">B</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry">bb</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-bb">cc</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-bb-cc">cc</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="t_i_cp_letter-H">H</th><td></td><td></td></tr>
-<tr><td></td><td class="printindex-index-entry"><a
href="#index-hhh-4">hhh</a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><a
href="#index-hhh-7">hhh</a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-hhh-3"></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-hhh-1">jjj</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-hhh-8">jjj</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-hhh-10">lll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-hhh">lll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-hhh-6">lll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-hhh-5">lll,
ppp</a></span>:</td><td> </td><td class="printindex-index-section"><a
href="#chapter-one">chapter one</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-hhh-9"><a class="email"
href="mailto:jjj">mymail</a></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-hhh-2">k</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-hhh-11">nnn</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><a
href="#index-hhh">hhh</a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><a
href="#index-hhh-1">hhh</a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-hhh-"></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-hhh-jjj">jjj</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-hhh-jjj-2">jjj</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-hhh-jjj-lll-2">lll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-hhh-jjj-lll">lll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-hhh-jjj-lll-1">lll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-hhh-jjj-lll-ppp">lll,
ppp</a></span>:</td><td> </td><td class="printindex-index-section"><a
href="#chapter-one">chapter one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-hhh-JJJ-jjj"><a class="email"
href="mailto:jjj">mymail</a></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-hhh-k">k</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-one">chapter
one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-hhh-k-nnn">nnn</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">l</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-hhh-12">third</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><a href="#index-hhh-jjj">hhh
jjj</a>:</td><td> </td><td class="printindex-index-section"><a
href="#chapter-one">chapter one</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-hhh-l-third">third</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-second">chapter
second</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><a href="#index-hhh-jjj-1">hhh
jjj</a>:</td><td> </td><td class="printindex-index-section"><a
href="#chapter-one">chapter one</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="cp-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#t_i_cp_letter-A"><b>A</b></a>
diff --git a/tp/t/results/indices/subentries.pl
b/tp/t/results/indices/subentries.pl
index ada2a1d8ad..1b5ed39a42 100644
--- a/tp/t/results/indices/subentries.pl
+++ b/tp/t/results/indices/subentries.pl
@@ -1198,14 +1198,14 @@ $result_converted{'html_text'}->{'subentries'} = '<div
class="top-level-extent"
<h2 class="chapter" id="Index">1 Index</h2>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
<div class="printindex cp-printindex">
<table class="cp-letters-header-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#t_i_cp_letter-A"><b>A</b></a>
@@ -1225,17 +1225,17 @@ $result_converted{'html_text'}->{'subentries'} = '<div
class="top-level-extent"
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="t_i_cp_letter-B">B</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="t_i_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="t_i_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="cp-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#t_i_cp_letter-A"><b>A</b></a>
@@ -1255,13 +1255,13 @@ $result_converted{'html_text'}->{'subentries'} = '<div
class="top-level-extent"
<tr><th id="t_i_fn_letter-F">F</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
</div>
diff --git a/tp/t/results/indices/subentry_and_sortas.pl
b/tp/t/results/indices/subentry_and_sortas.pl
index cc506f90e9..d415edf12e 100644
--- a/tp/t/results/indices/subentry_and_sortas.pl
+++ b/tp/t/results/indices/subentry_and_sortas.pl
@@ -692,9 +692,9 @@ $result_converted{'html_text'}->{'subentry_and_sortas'} =
'<div class="top-level
</div>
<h2 class="chapter" id="Index">1 Index</h2>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<div class="printindex cp-printindex">
<table class="cp-entries-printindex" border="0">
@@ -702,7 +702,7 @@ $result_converted{'html_text'}->{'subentry_and_sortas'} =
'<div class="top-level
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="t_i_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
</div>
@@ -712,7 +712,7 @@ $result_converted{'html_text'}->{'subentry_and_sortas'} =
'<div class="top-level
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="t_i_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
</div>
diff --git a/tp/t/results/indices/subentry_and_sortas_spaces.pl
b/tp/t/results/indices/subentry_and_sortas_spaces.pl
index 2e2a925f33..e1c6cefc31 100644
--- a/tp/t/results/indices/subentry_and_sortas_spaces.pl
+++ b/tp/t/results/indices/subentry_and_sortas_spaces.pl
@@ -827,10 +827,10 @@
$result_converted{'html_text'}->{'subentry_and_sortas_spaces'} = '<div class="to
</div>
<h2 class="chapter" id="Index">1 Index</h2>
-<a class="index-entry-id" id="index-aaa"></a>
-<a class="index-entry-id" id="index-aaa-1"></a>
-<a class="index-entry-id" id="index-aaa-2"></a>
-<a class="index-entry-id" id="index-aaa-3"></a>
+<a class="index-entry-id" id="index-aaa-bbb-sort-as-c"></a>
+<a class="index-entry-id" id="index-aaa-"></a>
+<a class="index-entry-id" id="index-aaa-bbb-ccc"></a>
+<a class="index-entry-id" id="index-aaa-bbb-ccc-1"></a>
<div class="printindex cp-printindex">
<table class="cp-entries-printindex" border="0">
@@ -838,11 +838,11 @@
$result_converted{'html_text'}->{'subentry_and_sortas_spaces'} = '<div class="to
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="t_i_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a href="#index-aaa">bbb sort as
c</a></span>:</td><td> </td><td class="printindex-index-section"><a
href="#chapter-index">chapter index</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-1"></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a href="#index-aaa-bbb-sort-as-c">bbb sort as
c</a></span>:</td><td> </td><td class="printindex-index-section"><a
href="#chapter-index">chapter index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-"></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">bbb</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-aaa-3">ccc</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-aaa-2">ccc</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-aaa-bbb-ccc-1">ccc</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-aaa-bbb-ccc">ccc</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter-index">chapter
index</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
</div>
diff --git a/tp/tests/layout/res_parser/formatting/formatting.html
b/tp/tests/layout/res_parser/formatting/formatting.html
index 11406aec21..401d10306a 100644
--- a/tp/tests/layout/res_parser/formatting/formatting.html
+++ b/tp/tests/layout/res_parser/formatting/formatting.html
@@ -6556,18 +6556,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -6575,9 +6575,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6660,7 +6660,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6674,7 +6674,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -6682,7 +6682,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6745,7 +6745,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7017,15 +7017,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7125,7 +7125,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7368,7 +7368,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7382,7 +7382,7 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -7390,7 +7390,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7453,7 +7453,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7723,15 +7723,15 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7831,7 +7831,7 @@ Menu comment
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
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 29bcbba9b1..95fff8eca3 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 cp aaa
+formatting.html#index-aaa-bbb cp aaa
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 cp b--b
+formatting.html#index-b_002d_002d_002db-c_002d_002d_002dc cp b--b
formatting.html#index-counting-entry cp counting entry
-formatting.html#index-d_002d_002d_002ddd cp d--dd
+formatting.html#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff
cp d--dd
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 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
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 fn f---bb
-formatting.html#index-f_002d_002d_002dddd fn f---ddd
-formatting.html#index-f_002d_002d_002dggg fn f---ggg
+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-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 fn xxx
+formatting.html#index-xxx-zzz fn xxx
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
diff --git a/tp/tests/layout/res_parser/formatting_chm/chapter.html
b/tp/tests/layout/res_parser/formatting_chm/chapter.html
index 637ed6bd26..b4f4ea521e 100644
--- a/tp/tests/layout/res_parser/formatting_chm/chapter.html
+++ b/tp/tests/layout/res_parser/formatting_chm/chapter.html
@@ -4321,18 +4321,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -4340,9 +4340,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -4425,7 +4425,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
@@ -4439,7 +4439,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -4447,7 +4447,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
@@ -4510,7 +4510,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-index-entry-between-item-and-itemx">index
entry between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
@@ -4782,15 +4782,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
@@ -4890,7 +4890,7 @@ Invalid use of @':
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_chm/chapter2.html
b/tp/tests/layout/res_parser/formatting_chm/chapter2.html
index e193626842..23aeccfe55 100644
--- a/tp/tests/layout/res_parser/formatting_chm/chapter2.html
+++ b/tp/tests/layout/res_parser/formatting_chm/chapter2.html
@@ -924,7 +924,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
@@ -938,7 +938,7 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="chapter.html">1 chapter</a></td></tr>
@@ -946,7 +946,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
@@ -1009,7 +1009,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-index-entry-between-item-and-itemx">index
entry between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
@@ -1279,15 +1279,15 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.html#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.html">Top
section</a></td></tr>
@@ -1387,7 +1387,7 @@ th.sections-header-printindex {text-align:left}
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_chm/formatting.hhk
b/tp/tests/layout/res_parser/formatting_chm/formatting.hhk
index 1aadb0a432..9e7aaac185 100644
--- a/tp/tests/layout/res_parser/formatting_chm/formatting.hhk
+++ b/tp/tests/layout/res_parser/formatting_chm/formatting.hhk
@@ -58,7 +58,7 @@
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="aaa">
-<param name="Local" value="chapter.html#index-aaa">
+<param name="Local" value="chapter.html#index-aaa-bbb">
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="a--a">
@@ -98,7 +98,7 @@
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="b--b">
-<param name="Local" value="chapter.html#index-b_002d_002d_002db">
+<param name="Local"
value="chapter.html#index-b_002d_002d_002db-c_002d_002d_002dc">
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="counting entry">
@@ -106,7 +106,7 @@
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="d--dd">
-<param name="Local" value="chapter.html#index-d_002d_002d_002ddd">
+<param name="Local"
value="chapter.html#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="d--efcv_name">
@@ -334,7 +334,7 @@
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="g--gg">
-<param name="Local" value="chapter.html#index-g_002d_002d_002dgg">
+<param name="Local"
value="chapter.html#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="index entry between item and itemx">
@@ -1070,15 +1070,15 @@
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="f---bb">
-<param name="Local" value="chapter.html#index-f_002d_002d_002dbb">
+<param name="Local"
value="chapter.html#index-f_002d_002d_002dbb-f_002d_002d_002dcc">
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="f---ddd">
-<param name="Local" value="chapter.html#index-f_002d_002d_002dddd">
+<param name="Local"
value="chapter.html#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff">
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="f---ggg">
-<param name="Local" value="chapter.html#index-f_002d_002d_002dggg">
+<param name="Local"
value="chapter.html#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll">
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="followed">
@@ -1426,7 +1426,7 @@
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="xxx">
-<param name="Local" value="chapter.html#index-xxx">
+<param name="Local" value="chapter.html#index-xxx-zzz">
</OBJECT> </LI>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="d--eftp_name">
diff --git
a/tp/tests/layout/res_parser/formatting_enable_encoding/formatting.html
b/tp/tests/layout/res_parser/formatting_enable_encoding/formatting.html
index bbb01f4e92..5f837240a5 100644
--- a/tp/tests/layout/res_parser/formatting_enable_encoding/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_enable_encoding/formatting.html
@@ -6556,18 +6556,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -6575,9 +6575,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6660,7 +6660,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td>Â </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td>Â </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a href="#index-aaa">bbb</a></span></td><td>Â
</td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a href="#index-aaa-bbb">bbb</a></span></td><td>Â
</td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td>Â
</td><td class="printindex-index-section"><a href="#Top">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td>Â
</td><td class="printindex-index-section"><a href="#Top">Top
section</a></td></tr>
@@ -6674,7 +6674,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td>Â
</td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -6682,7 +6682,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td>
 </td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td>
 </td><td class="printindex-index-section"><a href="#Top">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td>
 </td><td class="printindex-index-section"><a href="#Top">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td>
 </td><td class="printindex-index-section"><a href="#Top">Top
section</a></td></tr>
@@ -6745,7 +6745,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td>Â </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7017,15 +7017,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td>Â </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><code>f---bb</code></td><td>Â
</td><td class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td>Â
</td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td>
 </td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><code>f---ddd</code></td><td>Â
</td><td class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td class="printindex-index-entry"><code>f---ddd</code></td><td>Â
</td><td class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td class="printindex-index-entry"><code>f---ddd</code></td><td>Â
</td><td class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td>Â </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td>Â
</td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td>
 </td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><code>f---ggg</code></td><td>Â
</td><td class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh fjjj</code></span></td><td>Â </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td>Â </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7125,7 +7125,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><code>xxx</code></td><td>Â
</td><td class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to: Â </th><td><a
class="summary-letter-printindex" href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7368,7 +7368,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td>Â </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td>Â </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a href="#index-aaa">bbb</a></span></td><td>Â
</td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a href="#index-aaa-bbb">bbb</a></span></td><td>Â
</td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td>Â
</td><td class="printindex-index-section"><a href="#Top">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td>Â
</td><td class="printindex-index-section"><a href="#Top">Top
section</a></td></tr>
@@ -7382,7 +7382,7 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td>Â
</td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -7390,7 +7390,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td>
 </td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td>
 </td><td class="printindex-index-section"><a href="#Top">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td>
 </td><td class="printindex-index-section"><a href="#Top">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td>
 </td><td class="printindex-index-section"><a href="#Top">Top
section</a></td></tr>
@@ -7453,7 +7453,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td>Â </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7723,15 +7723,15 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td>Â </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><code>f---bb</code></td><td>Â
</td><td class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td>Â
</td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td>
 </td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><code>f---ddd</code></td><td>Â
</td><td class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td class="printindex-index-entry"><code>f---ddd</code></td><td>Â
</td><td class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td class="printindex-index-entry"><code>f---ddd</code></td><td>Â
</td><td class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td>Â </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td>Â
</td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td>
 </td><td class="printindex-index-section"><a href="#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><code>f---ggg</code></td><td>Â
</td><td class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh fjjj</code></span></td><td>Â </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td>Â </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td>Â </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7831,7 +7831,7 @@ Menu comment
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><code>xxx</code></td><td>Â
</td><td class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td>Â </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to: Â </th><td><a
class="summary-letter-printindex" href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter.xhtml
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter.xhtml
index 9facd70622..f0cabe894e 100644
---
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter.xhtml
@@ -4321,18 +4321,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -4340,9 +4340,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -4425,7 +4425,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -4439,7 +4439,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting_fot.xhtml#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
@@ -4447,7 +4447,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -4510,7 +4510,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-index-entry-between-item-and-itemx">index
entry between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -4782,15 +4782,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -4890,7 +4890,7 @@ Invalid use of @':
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:  
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
diff --git
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
index 0bd907db37..c937144b6a 100644
---
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
@@ -926,7 +926,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.xhtml#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.xhtml#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -940,7 +940,7 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.xhtml#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.xhtml#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting_fot.xhtml#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="chapter.xhtml#chapter">1 chapter</a></td></tr>
@@ -948,7 +948,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -1011,7 +1011,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-index-entry-between-item-and-itemx">index
entry between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -1281,15 +1281,15 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.xhtml#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -1389,7 +1389,7 @@ th.sections-header-printindex {text-align:left}
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml#chapter">1
chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:  
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter.xhtml
index d68ca8b9da..ffbd1cac4c 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter.xhtml
@@ -4322,18 +4322,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -4341,9 +4341,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -4426,7 +4426,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -4440,7 +4440,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting_fot.xhtml#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
@@ -4448,7 +4448,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -4511,7 +4511,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-index-entry-between-item-and-itemx">index
entry between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -4783,15 +4783,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -4891,7 +4891,7 @@ Invalid use of @':
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:  
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
index 52c1b0d918..716620a6e6 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
@@ -927,7 +927,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.xhtml#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.xhtml#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -941,7 +941,7 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.xhtml#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.xhtml#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting_fot.xhtml#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="chapter.xhtml">1 chapter</a></td></tr>
@@ -949,7 +949,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -1012,7 +1012,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1 chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-index-entry-between-item-and-itemx">index
entry between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -1282,15 +1282,15 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.xhtml#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.xhtml#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting.xhtml#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="formatting.xhtml">Top
section</a></td></tr>
@@ -1390,7 +1390,7 @@ th.sections-header-printindex {text-align:left}
<tr><td colspan="4"> </td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.xhtml#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.xhtml">1
chapter</a></td></tr>
<tr><td colspan="4"> </td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:  
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_exotic/chapter.html
b/tp/tests/layout/res_parser/formatting_exotic/chapter.html
index c8aef42342..0084dc8db6 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/chapter.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/chapter.html
@@ -4336,18 +4336,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -4355,9 +4355,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -4440,7 +4440,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4454,7 +4454,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
@@ -4462,7 +4462,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4525,7 +4525,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#chapter">chapter</a></td></tr>
@@ -4797,15 +4797,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4905,7 +4905,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_exotic/chapter2.html
b/tp/tests/layout/res_parser/formatting_exotic/chapter2.html
index 4ca827fccc..2c0a20484e 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/chapter2.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/chapter2.html
@@ -941,7 +941,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -955,7 +955,7 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="chapter.html">chapter</a></td></tr>
@@ -963,7 +963,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -1026,7 +1026,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-index-entry-between-item-and-itemx">index
entry between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
@@ -1296,15 +1296,15 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -1404,7 +1404,7 @@ th.sections-header-printindex {text-align:left}
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_fr_icons/formatting.html
b/tp/tests/layout/res_parser/formatting_fr_icons/formatting.html
index adbbb93d96..b13626434f 100644
--- a/tp/tests/layout/res_parser/formatting_fr_icons/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_fr_icons/formatting.html
@@ -6556,18 +6556,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -6575,9 +6575,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6660,7 +6660,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6674,7 +6674,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -6682,7 +6682,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6745,7 +6745,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7017,15 +7017,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7125,7 +7125,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Aller à:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7368,7 +7368,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7382,7 +7382,7 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -7390,7 +7390,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7453,7 +7453,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7723,15 +7723,15 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7831,7 +7831,7 @@ Menu comment
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Aller à:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_html/formatting.html
b/tp/tests/layout/res_parser/formatting_html/formatting.html
index 11406aec21..401d10306a 100644
--- a/tp/tests/layout/res_parser/formatting_html/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_html/formatting.html
@@ -6556,18 +6556,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -6575,9 +6575,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6660,7 +6660,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6674,7 +6674,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -6682,7 +6682,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6745,7 +6745,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7017,15 +7017,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7125,7 +7125,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7368,7 +7368,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7382,7 +7382,7 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -7390,7 +7390,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7453,7 +7453,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7723,15 +7723,15 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7831,7 +7831,7 @@ Menu comment
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_html32/formatting.html
b/tp/tests/layout/res_parser/formatting_html32/formatting.html
index a0fd286903..cd4c82130a 100644
--- a/tp/tests/layout/res_parser/formatting_html32/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_html32/formatting.html
@@ -6385,18 +6385,18 @@ Invalid use of @':
<a name="index-a-7"></a>
<a name="index-a_002d_002d_002da"></a>
-<a name="index-b_002d_002d_002db"></a>
-<a name="index-d_002d_002d_002ddd"></a>
+<a name="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a name="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a name="index-f_002d_002d_002daa"></a>
-<a name="index-f_002d_002d_002dbb"></a>
-<a name="index-f_002d_002d_002dddd"></a>
+<a name="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a name="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a name="index-aaa"></a>
+<a name="index-aaa-bbb"></a>
-<a name="index-xxx"></a>
+<a name="index-xxx-zzz"></a>
<a name="index-"></a>
@@ -6404,9 +6404,9 @@ Invalid use of @':
<a name="index-truc-4"></a>
-<a name="index-g_002d_002d_002dgg"></a>
+<a
name="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a name="index-f_002d_002d_002dggg"></a>
+<a
name="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6489,7 +6489,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td><a href="#index-a">a</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td>aaa</td><td> </td><td></td></tr>
-<tr><td></td><td><a href="#index-aaa">bbb</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a href="#index-aaa-bbb">bbb</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><a
href="#index-a_002d_002d_002da">a--a</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
@@ -6503,7 +6503,7 @@ Invalid use of @':
<tr><td></td><td><a
href="#index-b-4"><code>b</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><a
href="#index-b-5"><code>b</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td>b--b</td><td> </td><td></td></tr>
-<tr><td></td><td><a
href="#index-b_002d_002d_002db">c--c</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c--c</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td><a href="#index-counting-entry">counting
entry</a></td><td> </td><td><a href="#chapter">1 chapter</a></td></tr>
@@ -6511,7 +6511,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td>d--dd</td><td> </td><td></td></tr>
<tr><td></td><td>e--ee</td><td> </td><td></td></tr>
-<tr><td></td><td><a
href="#index-d_002d_002d_002ddd">f--ff</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f--ff</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
@@ -6574,7 +6574,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td>g--gg</td><td> </td><td></td></tr>
<tr><td></td><td>h--hh jjj</td><td> </td><td></td></tr>
-<tr><td></td><td><a href="#index-g_002d_002d_002dgg">k--kk,
l--ll</a></td><td> </td><td><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k--kk,
l--ll</a></td><td> </td><td><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td><a href="#Top">Top
section</a></td></tr>
@@ -6846,15 +6846,15 @@ Invalid use of @':
<tr><td></td><td><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><code>f---aaa</code>, <em>See</em>
<code>f---bbb</code></td><td> </td><td></td></tr>
<tr><td></td><td><code>f---bb</code></td><td> </td><td></td></tr>
-<tr><td></td><td><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><code>f---ddd</code></td><td> </td><td><em>See also</em>
f---ccc</td></tr>
<tr><td></td><td><code>f---ddd</code></td><td> </td><td><em>See also</em>
f---ccc</td></tr>
<tr><td></td><td><code>f---ddd</code></td><td> </td><td></td></tr>
<tr><td></td><td><code>f---eee</code></td><td> </td><td></td></tr>
-<tr><td></td><td><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><code>f---ggg</code></td><td> </td><td></td></tr>
<tr><td></td><td><code>f---hhh fjjj</code></td><td> </td><td></td></tr>
-<tr><td></td><td><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></td><td> </td><td><a href="#chapter">1
chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></td><td> </td><td><a href="#chapter">1
chapter</a></td></tr>
<tr><td></td><td><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
@@ -6954,7 +6954,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td><code>xxx</code></td><td> </td><td></td></tr>
-<tr><td></td><td><a
href="#index-xxx"><code>zzz</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-xxx-zzz"><code>zzz</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table><tr><th>Jump to: </th><td><a
href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7197,7 +7197,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td><a href="#index-a">a</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td>aaa</td><td> </td><td></td></tr>
-<tr><td></td><td><a href="#index-aaa">bbb</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a href="#index-aaa-bbb">bbb</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><a
href="#index-a_002d_002d_002da">a--a</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
@@ -7211,7 +7211,7 @@ Menu comment
<tr><td></td><td><a
href="#index-b-4"><code>b</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><a
href="#index-b-5"><code>b</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td>b--b</td><td> </td><td></td></tr>
-<tr><td></td><td><a
href="#index-b_002d_002d_002db">c--c</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c--c</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td><a href="#index-counting-entry">counting
entry</a></td><td> </td><td><a href="#chapter">1 chapter</a></td></tr>
@@ -7219,7 +7219,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td>d--dd</td><td> </td><td></td></tr>
<tr><td></td><td>e--ee</td><td> </td><td></td></tr>
-<tr><td></td><td><a
href="#index-d_002d_002d_002ddd">f--ff</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f--ff</a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
@@ -7282,7 +7282,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td>g--gg</td><td> </td><td></td></tr>
<tr><td></td><td>h--hh jjj</td><td> </td><td></td></tr>
-<tr><td></td><td><a href="#index-g_002d_002d_002dgg">k--kk,
l--ll</a></td><td> </td><td><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k--kk,
l--ll</a></td><td> </td><td><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td><a href="#Top">Top
section</a></td></tr>
@@ -7552,15 +7552,15 @@ Menu comment
<tr><td></td><td><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><code>f---aaa</code>, <em>See</em>
<code>f---bbb</code></td><td> </td><td></td></tr>
<tr><td></td><td><code>f---bb</code></td><td> </td><td></td></tr>
-<tr><td></td><td><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><code>f---ddd</code></td><td> </td><td><em>See also</em>
f---ccc</td></tr>
<tr><td></td><td><code>f---ddd</code></td><td> </td><td><em>See also</em>
f---ccc</td></tr>
<tr><td></td><td><code>f---ddd</code></td><td> </td><td></td></tr>
<tr><td></td><td><code>f---eee</code></td><td> </td><td></td></tr>
-<tr><td></td><td><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td><code>f---ggg</code></td><td> </td><td></td></tr>
<tr><td></td><td><code>f---hhh fjjj</code></td><td> </td><td></td></tr>
-<tr><td></td><td><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></td><td> </td><td><a href="#chapter">1
chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></td><td> </td><td><a href="#chapter">1
chapter</a></td></tr>
<tr><td></td><td><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td><a
href="#Top">Top section</a></td></tr>
@@ -7660,7 +7660,7 @@ Menu comment
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td><code>xxx</code></td><td> </td><td></td></tr>
-<tr><td></td><td><a
href="#index-xxx"><code>zzz</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td><a
href="#index-xxx-zzz"><code>zzz</code></a></td><td> </td><td><a
href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table><tr><th>Jump to: </th><td><a
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git
a/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.html
b/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.html
index 49b6c1e2bf..748020d66e 100644
--- a/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.html
@@ -4380,18 +4380,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -4399,9 +4399,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -4484,7 +4484,7 @@ Invalid use of @':
<tr><th id="chapter_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#Top">Top</a></td></tr>
@@ -4498,7 +4498,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
@@ -4506,7 +4506,7 @@ Invalid use of @':
<tr><th id="chapter_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#Top">Top</a></td></tr>
@@ -4569,7 +4569,7 @@ Invalid use of @':
<tr><th id="chapter_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a>:</td><td> </td><td class="printindex-index-section"><a
href="#chapter">chapter</a></td></tr>
@@ -4841,15 +4841,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code>:</td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code>:</td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#Top">Top</a></td></tr>
@@ -4949,7 +4949,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter_fn_symbol-1"><b>-</b></a>
@@ -5118,7 +5118,7 @@ Previous: <a href="#chapter" accesskey="p"
rel="prev">chapter</a>, Up: <a href="
<tr><th id="chapter2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#Top">Top</a></td></tr>
@@ -5132,7 +5132,7 @@ Previous: <a href="#chapter" accesskey="p"
rel="prev">chapter</a>, Up: <a href="
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
@@ -5140,7 +5140,7 @@ Previous: <a href="#chapter" accesskey="p"
rel="prev">chapter</a>, Up: <a href="
<tr><th id="chapter2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#Top">Top</a></td></tr>
@@ -5203,7 +5203,7 @@ Previous: <a href="#chapter" accesskey="p"
rel="prev">chapter</a>, Up: <a href="
<tr><th id="chapter2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a>:</td><td> </td><td class="printindex-index-section"><a
href="#chapter">chapter</a></td></tr>
@@ -5473,15 +5473,15 @@ Previous: <a href="#chapter" accesskey="p"
rel="prev">chapter</a>, Up: <a href="
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code>:</td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code>:</td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a>:</td><td> </td><td
class="printindex-index-section"><a href="#Top">Top</a></td></tr>
@@ -5581,7 +5581,7 @@ Previous: <a href="#chapter" accesskey="p"
rel="prev">chapter</a>, Up: <a href="
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span>:</td><td> </td><td
class="printindex-index-section"><a href="#chapter">chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_html_nodes/chapter.html
b/tp/tests/layout/res_parser/formatting_html_nodes/chapter.html
index 5b597aa768..013aefc7c6 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/chapter.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/chapter.html
@@ -4341,18 +4341,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -4360,9 +4360,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -4445,7 +4445,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4459,7 +4459,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting_fot.html#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
@@ -4467,7 +4467,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4530,7 +4530,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-index-entry-between-item-and-itemx">index entry
between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4802,15 +4802,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4910,7 +4910,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_html_nodes/chapter2.html
b/tp/tests/layout/res_parser/formatting_html_nodes/chapter2.html
index 694221577b..cdacb40746 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/chapter2.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/chapter2.html
@@ -941,7 +941,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -955,7 +955,7 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting_fot.html#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="chapter.html">1 chapter</a></td></tr>
@@ -963,7 +963,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -1026,7 +1026,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-index-entry-between-item-and-itemx">index entry
between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -1296,15 +1296,15 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -1404,7 +1404,7 @@ th.sections-header-printindex {text-align:left}
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_inline_css/formatting.html
b/tp/tests/layout/res_parser/formatting_inline_css/formatting.html
index 5e5a4ae316..d98b1abf75 100644
--- a/tp/tests/layout/res_parser/formatting_inline_css/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_inline_css/formatting.html
@@ -6516,18 +6516,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -6535,9 +6535,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6620,7 +6620,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-a">a</a></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top">aaa</td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
@@ -6634,7 +6634,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top">b—b</td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
@@ -6642,7 +6642,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top">d—dd</td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left:
0.5em">e—ee</span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
@@ -6705,7 +6705,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top">g—gg</td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em">h—hh
jjj</span></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"><a href="#Top">Top section</a></td></tr>
@@ -6977,15 +6977,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>f---bb</code></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left:
0.5em"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left:
0.5em"><code>f---hhh fjjj</code></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a href="#Top">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
@@ -7085,7 +7085,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>xxx</code></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex" style="text-decoration: none"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7328,7 +7328,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-a">a</a></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top">aaa</td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
@@ -7342,7 +7342,7 @@ Menu comment
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top">b—b</td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
@@ -7350,7 +7350,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top">d—dd</td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left:
0.5em">e—ee</span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
@@ -7413,7 +7413,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top">g—gg</td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em">h—hh
jjj</span></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"><a href="#Top">Top section</a></td></tr>
@@ -7683,15 +7683,15 @@ Menu comment
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>f---bb</code></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left:
0.5em"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left:
0.5em"><code>f---hhh fjjj</code></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-2" style="padding-left: 1.0em"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a href="#Top">Top
section</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align: top"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#Top">Top section</a></td></tr>
@@ -7791,7 +7791,7 @@ Menu comment
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><code>xxx</code></td><td> </td><td class="printindex-index-section"
style="vertical-align: top"></td></tr>
-<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry" style="vertical-align:
top"><span class="index-entry-level-1" style="padding-left: 0.5em"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section" style="vertical-align: top"><a
href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex" style="text-decoration: none"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_mathjax/formatting.html
b/tp/tests/layout/res_parser/formatting_mathjax/formatting.html
index 6b72e5320d..3c67f79b15 100644
--- a/tp/tests/layout/res_parser/formatting_mathjax/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_mathjax/formatting.html
@@ -6556,18 +6556,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -6575,9 +6575,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6660,7 +6660,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6674,7 +6674,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -6682,7 +6682,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6745,7 +6745,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7017,15 +7017,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7125,7 +7125,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7368,7 +7368,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7382,7 +7382,7 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -7390,7 +7390,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7453,7 +7453,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7723,15 +7723,15 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7831,7 +7831,7 @@ Menu comment
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_nodes/chapter.html
b/tp/tests/layout/res_parser/formatting_nodes/chapter.html
index 5b597aa768..013aefc7c6 100644
--- a/tp/tests/layout/res_parser/formatting_nodes/chapter.html
+++ b/tp/tests/layout/res_parser/formatting_nodes/chapter.html
@@ -4341,18 +4341,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -4360,9 +4360,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -4445,7 +4445,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4459,7 +4459,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting_fot.html#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
@@ -4467,7 +4467,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4530,7 +4530,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-index-entry-between-item-and-itemx">index entry
between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4802,15 +4802,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -4910,7 +4910,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_nodes/chapter2.html
b/tp/tests/layout/res_parser/formatting_nodes/chapter2.html
index 694221577b..cdacb40746 100644
--- a/tp/tests/layout/res_parser/formatting_nodes/chapter2.html
+++ b/tp/tests/layout/res_parser/formatting_nodes/chapter2.html
@@ -941,7 +941,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -955,7 +955,7 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="formatting_fot.html#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="chapter.html">1 chapter</a></td></tr>
@@ -963,7 +963,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -1026,7 +1026,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-index-entry-between-item-and-itemx">index entry
between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -1296,15 +1296,15 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.html#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.html">Top section</a></td></tr>
@@ -1404,7 +1404,7 @@ th.sections-header-printindex {text-align:left}
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git
a/tp/tests/layout/res_parser/formatting_numerical_entities/formatting.html
b/tp/tests/layout/res_parser/formatting_numerical_entities/formatting.html
index ac0687438a..7eef422430 100644
--- a/tp/tests/layout/res_parser/formatting_numerical_entities/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_numerical_entities/formatting.html
@@ -6556,18 +6556,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -6575,9 +6575,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6660,7 +6660,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6674,7 +6674,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -6682,7 +6682,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6745,7 +6745,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7017,15 +7017,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7125,7 +7125,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:  
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7368,7 +7368,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7382,7 +7382,7 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -7390,7 +7390,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7453,7 +7453,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7723,15 +7723,15 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7831,7 +7831,7 @@ Menu comment
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:  
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git
a/tp/tests/layout/res_parser/formatting_sort_element_counts/formatting.html
b/tp/tests/layout/res_parser/formatting_sort_element_counts/formatting.html
index 11406aec21..401d10306a 100644
--- a/tp/tests/layout/res_parser/formatting_sort_element_counts/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_sort_element_counts/formatting.html
@@ -6556,18 +6556,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -6575,9 +6575,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6660,7 +6660,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6674,7 +6674,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -6682,7 +6682,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6745,7 +6745,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7017,15 +7017,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7125,7 +7125,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7368,7 +7368,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7382,7 +7382,7 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -7390,7 +7390,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7453,7 +7453,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7723,15 +7723,15 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7831,7 +7831,7 @@ Menu comment
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_weird_quotes/formatting.html
b/tp/tests/layout/res_parser/formatting_weird_quotes/formatting.html
index b50fbecd96..cdef52aeae 100644
--- a/tp/tests/layout/res_parser/formatting_weird_quotes/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_weird_quotes/formatting.html
@@ -6556,18 +6556,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -6575,9 +6575,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6660,7 +6660,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6674,7 +6674,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -6682,7 +6682,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6745,7 +6745,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7017,15 +7017,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7125,7 +7125,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7368,7 +7368,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7382,7 +7382,7 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -7390,7 +7390,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7453,7 +7453,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7723,15 +7723,15 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7831,7 +7831,7 @@ Menu comment
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/layout/res_parser/formatting_xhtml/formatting.html
b/tp/tests/layout/res_parser/formatting_xhtml/formatting.html
index 73fdfc1163..6fcd1b1ab5 100644
--- a/tp/tests/layout/res_parser/formatting_xhtml/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_xhtml/formatting.html
@@ -6556,18 +6556,18 @@ Invalid use of @':
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -6575,9 +6575,9 @@ Invalid use of @':
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -6660,7 +6660,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6674,7 +6674,7 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr/></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -6682,7 +6682,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -6745,7 +6745,7 @@ Invalid use of @':
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr/></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7017,15 +7017,15 @@ Invalid use of @':
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7125,7 +7125,7 @@ Invalid use of @':
<tr><td colspan="4"> <hr/></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr/></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
@@ -7368,7 +7368,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7382,7 +7382,7 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr/></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-counting-entry">counting entry</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
@@ -7390,7 +7390,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7453,7 +7453,7 @@ Menu comment
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr/></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#Top">Top section</a></td></tr>
@@ -7723,15 +7723,15 @@ Menu comment
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#Top">Top section</a></td></tr>
@@ -7831,7 +7831,7 @@ Menu comment
<tr><td colspan="4"> <hr/></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr/></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/tex_html/res_parser/formatting_singular/chapter.html
b/tp/tests/tex_html/res_parser/formatting_singular/chapter.html
index c631a2991e..3d2e33cbe6 100644
--- a/tp/tests/tex_html/res_parser/formatting_singular/chapter.html
+++ b/tp/tests/tex_html/res_parser/formatting_singular/chapter.html
@@ -4774,18 +4774,18 @@ $">
<a class="index-entry-id" id="index-a-7"></a>
<a class="index-entry-id" id="index-a_002d_002d_002da"></a>
-<a class="index-entry-id" id="index-b_002d_002d_002db"></a>
-<a class="index-entry-id" id="index-d_002d_002d_002ddd"></a>
+<a class="index-entry-id" id="index-b_002d_002d_002db-c_002d_002d_002dc"></a>
+<a class="index-entry-id"
id="index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff"></a>
<a class="index-entry-id" id="index-f_002d_002d_002daa"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dbb"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dddd"></a>
+<a class="index-entry-id" id="index-f_002d_002d_002dbb-f_002d_002d_002dcc"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"></a>
-<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-bbb"></a>
-<a class="index-entry-id" id="index-xxx"></a>
+<a class="index-entry-id" id="index-xxx-zzz"></a>
<a class="index-entry-id" id="index-"></a>
@@ -4793,9 +4793,9 @@ $">
<a class="index-entry-id" id="index-truc-4"></a>
-<a class="index-entry-id" id="index-g_002d_002d_002dgg"></a>
+<a class="index-entry-id"
id="index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll"></a>
-<a class="index-entry-id" id="index-f_002d_002d_002dggg"></a>
+<a class="index-entry-id"
id="index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"></a>
@@ -4878,7 +4878,7 @@ $">
<tr><th id="chapter-1_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.htm#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.htm">Top section</a></td></tr>
@@ -4892,7 +4892,7 @@ $">
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="sing_fot.htm#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
@@ -4900,7 +4900,7 @@ $">
<tr><th id="chapter-1_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.htm#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.htm">Top section</a></td></tr>
@@ -4963,7 +4963,7 @@ $">
<tr><th id="chapter-1_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-index-entry-between-item-and-itemx">index entry between
item and itemx</a></td><td> </td><td class="printindex-index-section"><a
href="#chapter">1 chapter</a></td></tr>
@@ -5235,15 +5235,15 @@ $">
<tr><td></td><td class="printindex-index-entry"><a
href="#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a href="#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.htm#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.htm">Top section</a></td></tr>
@@ -5343,7 +5343,7 @@ $">
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-1_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="#chapter">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-1_fn_symbol-1"><b>-</b></a>
diff --git a/tp/tests/tex_html/res_parser/formatting_singular/chapter2.html
b/tp/tests/tex_html/res_parser/formatting_singular/chapter2.html
index 2a39e34992..13d7aa3bad 100644
--- a/tp/tests/tex_html/res_parser/formatting_singular/chapter2.html
+++ b/tp/tests/tex_html/res_parser/formatting_singular/chapter2.html
@@ -966,7 +966,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-a">a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry">aaa</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-aaa">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-aaa-bbb">bbb</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-a_002d_002d_002da">a—a</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.htm#index-titlepage-a_002d_002dasis"><code>a--asis</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.htm">Top section</a></td></tr>
@@ -980,7 +980,7 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-b-4"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-b-5"><code>b</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry">b—b</td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-b_002d_002d_002db">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-b_002d_002d_002db-c_002d_002d_002dc">c—c</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="sing_fot.htm#index-counting-entry">counting
entry</a></td><td> </td><td class="printindex-index-section"><a
href="chapter.html">1 chapter</a></td></tr>
@@ -988,7 +988,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">d—dd</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">e—ee</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-d_002d_002d_002ddd">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-d_002d_002d_002ddd-e_002d_002d_002dee-f_002d_002d_002dff">f—ff</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-d_002d_002defcv_005fname-1"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.htm#index-titlepage-d_002d_002defcv_005fname"><code>d--efcv_name</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.htm">Top section</a></td></tr>
@@ -1051,7 +1051,7 @@ th.sections-header-printindex {text-align:left}
<tr><th id="chapter-2_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry">g—gg</td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1">h—hh jjj</span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-g_002d_002d_002dgg">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-g_002d_002d_002dgg-h_002d_002d_002dhh-jjj-k_002d_002d_002dkk-l_002d_002d_002dll">k—kk,
l—ll</a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-index-entry-between-item-and-itemx">index
entry between item and itemx</a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
@@ -1321,15 +1321,15 @@ th.sections-header-printindex {text-align:left}
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-f_002d_002d_002daa"><code>f---aa</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-see-entry"><code
class="code">f---aaa</code>, <em class="emph">See</em> <code
class="code">f---bbb</code></td><td> </td><td
class="printindex-index-see-entry-section"></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---bb</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-f_002d_002d_002dbb"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-f_002d_002d_002dbb-f_002d_002d_002dcc"><code>f---cc</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-see-also"><em class="emph">See also</em>
f---ccc</td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ddd</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---eee</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dddd"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dddd-f_002d_002d_002deee-ffff"><code>ffff</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>f---ggg</code></td><td> </td><td
class="printindex-index-section"></td></tr>
<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><code>f---hhh
fjjj</code></span></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dggg"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-2"><a
href="chapter.html#index-f_002d_002d_002dggg-f_002d_002d_002dhhh-fjjj-f_002d_002d_002dkkk-f_002d_002d_002dlll"><code>f---kkk,
f---lll</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="chapter.html#index-copying-followed-1"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a
href="index.htm#index-titlepage-followed"><code>followed</code></a></td><td> </td><td
class="printindex-index-section"><a href="index.htm">Top section</a></td></tr>
@@ -1429,7 +1429,7 @@ th.sections-header-printindex {text-align:left}
<tr><td colspan="4"> <hr></td></tr>
<tr><th id="chapter-2_fn_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td
class="printindex-index-entry"><code>xxx</code></td><td> </td><td
class="printindex-index-section"></td></tr>
-<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-xxx"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><span
class="index-entry-level-1"><a
href="chapter.html#index-xxx-zzz"><code>zzz</code></a></span></td><td> </td><td
class="printindex-index-section"><a href="chapter.html">1 chapter</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table class="fn-letters-footer-printindex"><tr><th>Jump to:
</th><td><a class="summary-letter-printindex"
href="#chapter-2_fn_symbol-1"><b>-</b></a>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Converter.pm (comma_index_subentries_tree), tp/Texinfo/Convert/HTML.pm (_prepare_index_entries): use subentries to determine the identifier of an index entry. Add an optional separator argument to comma_index_subentries_tree() to be able to use something else than a comma. Use a space separator to determine the identifier to keep it shorter.,
Patrice Dumas <=