From bb28e17bbdc606d6f95ec038100fee878d34a9fc Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sun, 14 Apr 2024 12:35:52 +0200 Subject: [PATCH] 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. --- www/index.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/index.pl b/www/index.pl index abb1f24..fbec00f 100755 --- a/www/index.pl +++ b/www/index.pl @@ -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{([^<\n]+?)<\/b>\n}{ push @toc, $1;