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

Jonathan Gibbons jjg at openjdk.org
Tue Jan 3 19:16:45 UTC 2023

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.


Commit messages:
 - fix whitespace
 - JDK-8298405: Markdown support in the standard doclet

Changes: https://git.openjdk.org/jdk/pull/11701/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11701&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8298405
  Stats: 9618 lines in 140 files changed: 9345 ins; 113 del; 160 mod
  Patch: https://git.openjdk.org/jdk/pull/11701.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11701/head:pull/11701

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

More information about the compiler-dev mailing list