RFR: JDK-8309471: Do not list section links in static index pages
Jonathan Gibbons
jjg at openjdk.org
Tue Jun 6 16:13:54 UTC 2023
On Mon, 5 Jun 2023 13:50:06 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
> Please review a simple change to avoid adding section index items (added in JDK-8286470) from appearing in the static index pages where the tend to cause trouble.
>
> The change is implemented by making `IndexItem.isTagItem()` behave true to its specification again and only return `true` if it actually represents a JavaDoc tag, and add a new `IndexItem.isSectionItem()` method for the new section index items. The new method is used to make sure section links are not listed in the index pages.
I think it is (still) a good default to be able to say that the static and interactive index have the same content.
I agree that headings that begin with a perceived section number are somewhat problematic. While it might be possible to detect/skip a leading dotted-number "word", I think a simpler algorithm to index under the first letter is simpler to explain and mostly good enough. (It would only be less than ideal if the first word is an alphanumeric sequence like `802.11az`)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14312#issuecomment-1579060110
More information about the javadoc-dev
mailing list