RFR: JDK-8298405: Markdown support in the standard doclet

Pavel Rappo prappo at openjdk.org
Thu Jan 5 10:40:51 UTC 2023


On Thu, 15 Dec 2022 23:47:45 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

> Support for Markdown comments in the standard doclet.
> 
> To enable Markdown in a comment, start the comment with `/**md` followed by whitespace.  The syntax is as defined for CommonMark.
> 
> The work is in 3 parts:
> 
> 1. Update the Compiler Tree API to support Markdown tree nodes, containing strings of (uninterpreted) Markdown source code.
> 2. Import commonmark-java into the `jdk.javadoc` module, to be able to convert Markdown strings to HTML.
> 3. Update the standard doclet, to leverage the preceding two parts, to translate Markdown in documentation comments to `Content` nodes.
> 
> There are new tests both for the low level work in the Compiler Tree API, and for the overall high-level work in the doclet.

src/jdk.compiler/share/classes/com/sun/source/doctree/DocTreeVisitor.java line 218:

> 216:      * @since 21
> 217:      */
> 218:     R visitMarkdown(MarkdownTree node, P p);

This is supposed to be a `default` method, right?

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

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


More information about the javadoc-dev mailing list