www: Keep links to other man pages within the same system

The sidebar links should actually stay within the same system as well,
it's quite confusing this way. Meh.
This commit is contained in:
Yorhel 2024-04-14 12:35:52 +02:00
parent a99b8aec89
commit bb28e17bbd

View file

@ -811,6 +811,12 @@ sub man_page {
return;
}
# Prefix links to other man pages with the current system, to ensure we
# grab the most relevant man page.
# XXX: This is a hack, prefixing is better done directly in ManUtils.
my $sys = sysbyid->{$man->{system}}{short};
$fmt =~ s{<a href="/}{<a href="/man/$sys/}g;
my @toc;
$fmt =~ s{\n<b>([^<\n]+?)<\/b>\n}{
push @toc, $1;