Discussion:
Man page chapters link to #end
(too old to reply)
Ed Schouten
2016-08-02 06:05:36 UTC
Permalink
Hi there,

I was just taking a look at a man page through the FreeBSD web site:

https://www.freebsd.org/cgi/man.cgi?query=cloudabi-run

What I noticed is that the chapters of the man page are all anchors.
From the HTML:

<a name="YAML_TAGS" href="#end"><b>YAML TAGS</b></a>

It's nice that they all have a name attribute. Question: would it make
sense to let the href point to the #name as well, instead of linking
them all to #end? That way you can click on a chapter name to obtain a
link that you can share with others.

Thanks,
--
Ed Schouten <***@nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717
Ed Schouten
2016-08-02 06:09:53 UTC
Permalink
Post by Ed Schouten
https://www.freebsd.org/cgi/man.cgi?query=cloudabi-run
Ah! Looks like this maps over to:

https://svnweb.freebsd.org/doc/head/en_US.ISO8859-1/htdocs/cgi/man.cgi?view=log

Would anyone mind if I committed this patch?

Index: man.cgi
===================================================================
--- man.cgi (revision 49205)
+++ man.cgi (working copy)
@@ -1439,7 +1439,7 @@
$i = $_;
$j = &encode_url($i);
$j =~ s/\+/_/g;
- $_ = qq{<a name="$j" href="#end"><b>$i</b></a>\n};
+ $_ = qq{<a name="$j" href="#$j"><b>$i</b></a>\n};
push( @sect, $i );
}
print;
--
Ed Schouten <***@nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717
Loading...