On Fri, 9 Oct 2026 14:46:17 GMT, Hannes Wallnöfer <[email protected]> wrote:

> Please review a change to fix the representation of tags created with the 
> javadoc `-tag` option when there are multiple tags per element. Current 
> behavior is to render them as comma-separated list, which doesn't make sense 
> for block-level elements.
> 
> The new solution is to encode multiple note tags as individual `<dd>` 
> elements. This reflects their status as separate block level elements and is 
> also compliant with the content model for the `<dl>` list [in the HTML5 
> spec](https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element).
>  While multiple  `<dd>` elements are rendered like paragraphs by the default 
> stylesheet the semantic structure of the notes is preserved in HTML and could 
> be used by custom stylesheets.
> 
> The change is implemented with an anonymous subclass of `SimpleTaglet` for 
> custom tags that overrides the block tag rendering method. Rendering as 
> comma-separated list is preserved for other simple tags such as `@author` or 
> `@version`.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 90dfb8cf
Author:    Hannes Wallnöfer <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/90dfb8cfeae718617ff977ffb9300b490c65a8c7
Stats:     140 lines in 3 files changed: 117 ins; 15 del; 8 mod

8393742: Multiple @apiNote tags in a doc comment are rendered poorly

Reviewed-by: nbenalla

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

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

Reply via email to