RFR: JDK-8301201: Allow \n@ inside inline tags using inlineContent
Hannes Wallnöfer
hannesw at openjdk.org
Tue Jan 31 14:58:08 UTC 2023
On Fri, 27 Jan 2023 18:41:45 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
> Please review a simple change to allow the use of _newline_ _whitespace_ `@` inside inline tags that allow rich content (that is, those parsed with `inlineContent`) as compared to those that only allow plain text (that is, those parsed with `inlineText`).
>
> The fix is to delete the code which recognizes `@` as the beginning of a block tag. Compare to the similar fix in [JDK-8241780](https://bugs.openjdk.org/browse/JDK-8241780)
>
> The general `TagTest.java` is updated for the new feature.
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?
-------------
PR: https://git.openjdk.org/jdk/pull/12264
More information about the javadoc-dev
mailing list