doc: don't include "chapter", "section" etc in the HTML index

The use of statements like "chapter", "section" and so on makes the
HTML index insanely verbose. Remove them; they don't add any
information.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2022-11-09 19:02:56 -08:00
parent beabb3ccb7
commit 5219d14e6f

View File

@ -1024,10 +1024,17 @@ sub html_index {
push @a, "n :";
$sep = 0;
foreach $node (@nodes) {
next if !$idxnodes{$node,$itag};
push @a, "n ," if $sep;
push @a, "sp", "x $xrefnodes{$node}", "n $node", "xe$xrefnodes{$node}";
$sep = 1;
next if !$idxnodes{$node,$itag};
my $xn = $xrefnodes{$node};
my $nn = $node;
# Text like "chapter", "appendix", "section", etc in the index
# makes it unnecessarily wide
$nn =~ s/^.*\s+//g; # Remove all but the actual index information
push @a, "n ," if $sep;
push @a, "sp", "x $xn", "n $nn", "xe$xn";
$sep = 1;
}
print "<li class=\"index\">\n";
$line = '';