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).

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

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

Changes: https://git.openjdk.org/jdk/pull/33288/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33288&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8393742
  Stats: 140 lines in 3 files changed: 117 ins; 15 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/33288.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33288/head:pull/33288

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

Reply via email to