On Wed, 11 Sep 2024 22:36:02 GMT, Jonathan Gibbons <[email protected]> wrote:
> Please review these changes to correct the handling of leading and trailing
> indented code blocks in a doc comment.
>
> There are two separate issues here: one for leading indented code blocks and
> one for trailing indented code blocks.
>
> 1. Leading indented code blocks: the code to detect the first sentence of a
> doc comment is modified to detect whether the comment begins with an indented
> code block. If it does, the first sentence is deemed to be empty, and the
> body of the doc comment begins with the code block.
> 2. Trailing indented code blocks: the content of the indented code block is
> marked as significant by updating `lastNonWhite`, which will cause the
> content to be recorded (not dropped) if the code block is followed by EOF.
>
> For both cases, simple `DocTree` AST-level tests are provided, as well as
> full `JavadocTester` tests, that test the end-user view of the generated docs.
Grrr, the fix is incomplete. I went back and tried the example from the JBS
issue, and the part related to the annotation in a leading indented code block
is still there.
Generating play/test/api/Test.html...
play/test/src/Test.java:2: warning: unknown tag. Unregistered custom tag?
/// @Override
^
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20956#issuecomment-2347182668