On Tue, 8 Apr 2025 06:51:20 GMT, Hannes Wallnöfer <[email protected]> wrote:
>> make/jdk/src/classes/build/tools/taglet/PreviewNote.java line 112:
>>
>>> 110: """);
>>> 111: return sb.toString();
>>> 112: } else {
>>
>> What does this else block do? In what case can the JEP number be blank?
>
> The else block generates the closing tag for the note. As you see in the PR
> description, the tag syntax resembles HTML open/close tags. This is a
> compromise to be able to locate the note within the description (which isn't
> possible with block tags), and being able to use rich content in the note
> without being required to writing a dedicated tag parser and rendering code.
> (I also happen to find this syntax easier to read than a custom inline tag,
> which would require additional rules to separate meta data from note content.)
Such usage should be reflected in `testPreviewNoteTag`, which currently does
not use it as open/close tags.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23395#discussion_r2033775847