RFR: JDK-8301201: Allow \n@ inside inline tags using inlineContent [v2]

Jonathan Gibbons jjg at openjdk.org
Wed Feb 1 00:08:51 UTC 2023


On Tue, 31 Jan 2023 14:55:34 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:

>> Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix broken tests
>
> test/langtools/tools/javac/doctree/DocCommentTester.java line 922:
> 
>> 920:             String s2 = s.trim().replaceFirst("\\.\\s*\\n *@", ".\n@");
>> 921:             StringBuilder sb = new StringBuilder();
>> 922:             Pattern p = Pattern.compile("(?i)\\{@([a-z][a-z0-9.:-]*)( )?");
> 
> Why is this change necessary? I see it is intended to impact the unknown inline tag in `TagTest.java`, but couldn't the test be written without this change?

Previously, the only tags in which `newline at` was supported were `{@code}` `{@literal}` and  `{@snippet}` ... and this tag predated `{@snippet}` which is the main reason it's not included here.

Now `newline at` is supported in all inline tags, so the scope of this check is broadened accordingly.

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

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


More information about the compiler-dev mailing list