Nir,
Thank you for your question. It may be that there is a bug, or at
least, a lack of tests, in this area.
In general, you need to give text for the link, since (unlike for
program elements) javadoc cannot infer the string for itself. Iit
doesn't go looking for headings and ids.
You might try `@see Chronus##time-heading my-text` or failing that `href="Chronus.html##time-heading">my-text
For our part, we should make sure that we have tests for this situation
and/or clarify the spec if that is needed.
-- Jon
On 2/15/24 9:22 AM, Nir Lisker wrote:
Hi,
I have a question after reading
https://bugs.openjdk.org/browse/JDK-8294195. If I have a class
Chronus.java with a heading in its class javadoc:
Time
then an anchor Chronus.html#time-heading is auto-generated. How do I
link to this anchor from within the class using @see and @link? I have
tried
@see ##time-heading
@see Chronus.html##time-heading
@see Chronus##Chronus.html#time-heading
None of which work. What is the correct syntax?
Thanks,
Nir