-
Task
-
Resolution: Fixed
-
P4
-
None
My colleague Chris Povirk noticed the following issue with the 'Programmer's Guide to Snippets' docs. I'm not sure if this is the best place to report this, but I saw discussion of the guide in other issues in this component (https://bugs.openjdk.org/browse/JDK-8284039).
https://docs.oracle.com/en/java/javase/22/javadoc/programmers-guide-snippets.html#GUID-1B435AA6-84D5-4693-AF5E-6470EEE970FC gives an example snippet:
{@snippet :
public static void main(String... args) {
System.out.println("Hello, World!");
}
}
It claims:
In this example, the snippet tag is the same as in the previous example, except that the indentation of the final right curly bracket is increased, to eliminate the indentation in the generated output.
However, "the previous example" is the one under Inline Snippets, and the source code there has identical HTML source to the current example. (The "generated output" of the two does differ.)
I don't know if some original source code (Markdown or something) makes some distinction that's lost in the generated HTML or if the source code itself got messed up at some point.
https://docs.oracle.com/en/java/javase/22/javadoc/programmers-guide-snippets.html#GUID-1B435AA6-84D5-4693-AF5E-6470EEE970FC gives an example snippet:
{@snippet :
public static void main(String... args) {
System.out.println("Hello, World!");
}
}
It claims:
In this example, the snippet tag is the same as in the previous example, except that the indentation of the final right curly bracket is increased, to eliminate the indentation in the generated output.
However, "the previous example" is the one under Inline Snippets, and the source code there has identical HTML source to the current example. (The "generated output" of the two does differ.)
I don't know if some original source code (Markdown or something) makes some distinction that's lost in the generated HTML or if the source code itself got messed up at some point.