-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMarkdownComments.java
52 lines (41 loc) · 1.53 KB
/
MarkdownComments.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package org.javademos.java23.jep467;
import org.javademos.commons.IDemo;
/// Demo for JDK 23 feature **Markdown Documentation Comments** (JEP 467)
///
/// JEP history:
/// - JDK 23: [JEP 467 - Markdown Documentation Comments](https://openjdk.org/jeps/467)
///
/// Further reading:
/// - [Java Enhances Documentation with Markdown Support](https://www.infoq.com/news/2024/05/jep467-markdown-in-javadoc/)
///
/// @author [email protected]
@SuppressWarnings("DanglingJavadoc") // because of the example on line 24
public class MarkdownComments implements IDemo {
@Override
public void demo() {
info(467);
}
// Markdown syntax is now possible in Javadoc comments
// It has to be started with different prefix - /// instead of /**
// BEFORE JDK 23 - Javadoc header
/**
* <p>
* Demo for JDK 23 feature <strong>Markdown Documentation Comments</strong> (JEP 467)
* </p>
*
* @see <a href="https://openjdk.org/jeps/467">JEP 467</a>
* @author [email protected]
*/
// AFTER JDK 23 - Javadoc header
/// Demo for JDK 23 feature **Markdown Documentation Comments** (JEP 467)
///
/// @see <a href="https://openjdk.org/jeps/467">JEP 467</a>
/// @author [email protected]
// ISSUES / LIMITATIONS
// @see and external link
// ----------------------
// /// @see [JEP 467](https://openjdk.org/jeps/467)
// md syntax is currently not possible
// /// @see <a href="https://openjdk.org/jeps/467">JEP 467</a>
// html <a> tag renders fine...
}