diff options
author | Yorhel <git@yorhel.nl> | 2024-04-14 12:35:52 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2024-04-14 12:35:54 +0200 |
commit | bb28e17bbdc606d6f95ec038100fee878d34a9fc (patch) | |
tree | 13569db850d8f44f135ee0fde287a610581f28a3 | |
parent | a99b8aec89234f220c7ee5dcf2be27679e8f8c8f (diff) |
The sidebar links should actually stay within the same system as well,
it's quite confusing this way. Meh.
-rwxr-xr-x | www/index.pl | 6 |
1 files changed, 6 insertions, 0 deletions
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{<a href="/}{<a href="/man/$sys/}g; + my @toc; $fmt =~ s{\n<b>([^<\n]+?)<\/b>\n}{ push @toc, $1; |