On Mon, 25 Jul 2022 15:10:36 GMT, Hannes Wallnöfer <[email protected]> wrote:

> This is a simple change to automatically generate `id` attributes for HTML 
> headers in documentation comments. 
> 
> I decided to leave the functionality in `HtmlDocletWriter` rather than moving 
> it to `HtmlIds` because it uses the same helper methods 
> as`commentTagsToContent`.
> 
> The value of the `id` attribute id derived from the content of the header tag 
> with spaces and other non-word characters replaced by `-`. A `-hdr` suffix is 
> appended to avoid collisions with other ids. If there are duplicate values an 
> int counter is appended to make them unique.

Thanks for the review, I think I addressed all your feedback in the incremental 
commit.

As a corner case I removed the emptiness check for the heading text, so an 
empty heading will now get an `id="-heading[idx]"` attribute which is useless 
but also harmless.

-------------

PR: https://git.openjdk.org/jdk/pull/9627

Reply via email to