RFR: 8371896: Links in snippets can not be highlighted

Hannes Wallnöfer hannesw at openjdk.org
Mon Nov 17 15:28:47 UTC 2025


Please review a simple change to allow fragments of snippet content to act both as link and highlighted text. Previously, only the link was generated while the highlight was ignored. 

We also change snippet links to use the aequivalent of `{@linkplain}` instead of `{@link}` because the `<code>` element in `{@link}` markup is redundant in snippet content which is already inside a `<code>` element. `{@link}` also creates `PREVIEW` superscript flags which are likely to be disruptive in example code.

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

Commit messages:
 - 8371896: Links in snippets can not be highlighted

Changes: https://git.openjdk.org/jdk/pull/28354/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28354&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8371896
  Stats: 80 lines in 2 files changed: 64 ins; 2 del; 14 mod
  Patch: https://git.openjdk.org/jdk/pull/28354.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28354/head:pull/28354

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


More information about the javadoc-dev mailing list