Java 23 now allows Markdown Documentation Comments
I am experimenting with this feature right now in latest IntelliJ IDEA 2024.2.2 (community) and with GraalVM for JDK 23 as Java runtime. It seems the IDE cannot handle external links in traditional markdown syntax:
/// This is a **Markdown** comment
/// @see [Markdown Documentation Comments - in MD](https://openjdk.org/jeps/467)
/// @see <a href="https://openjdk.org/jeps/467">Markdown Documentation Comments - in HTML</a>
The HTML link renders fine, but markdown is broken:
Also, the latest version of Apache Maven Javadoc Plugin (3.10.0
) fails to render such link. It skips it completely:
Is this a bug yet to be fixed or did I overlooked something in the docs that prevents me from writing external links like that? In the JEP description and on Oracle JavaDoc guide I found not a word about treating external links.
@see
tag is a bit strange, in that it has a number of pretty specific formats. The<a href
form, for example, isn't arbitrary HTML but rather a specific variant of the@see
format. I am a bit surprised the markdown doesn't render correctly... but not shocked. Does it work if you surround the string with quotes?"[Markdown Documentation .../467)"
? That's one of the listed formats. – Sinful@see
tag – Bourse@see
([Markdown
in your case) is interpreted by Javadoc and only the rest (Documentation Comments - in MD](https://openjdk.org/jeps/467)
) is processed as Markdown. Does@see <a href=""></a> [Markdown ... /467)
work? – Rivalry