I've noticed two issues related to HTML entities in Javadoc:
Text between <> do not show up in the hover popup, even when escaped, e.g. <foo>
HTML entities in {@literal} tags are still escaped (and as an effect {@literal <text>} and {@literal <text>} don't show up either)
Both of these behaviours are inconsistent with the output of the official Javadoc tool.
Environment
Operating System: Ubuntu 20.04.2 LTS
JDK version: 11.0.10
Visual Studio Code version: 1.55.0-insider
Java extension version: v0.76.0
Steps To Reproduce
Create a new Java source file
Paste in the following code:
public class Foo {
/**
* <foo>
* {@literal <bar>}
* {@literal <bar>}
* {@literal <}
* baz
*/
public void bar () {
}
}
Hover on the name of bar(), and only < baz will show up
Current Result
The first three lines are completely gone. The fourth line is displayed as <, even though it is inside a literal block and thus should remain as <.
Expected Result
Output of Javadoc tool for comparison:
The first line should be shown as <foo>, and all following lines in {@literal} tags should be shown as-is, without converting HTML entities.
Additional Informations
I didn't make a project for this since it's reproducible with just a single file, but it should also be the same in a project.
π React with π 1luangong