You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider a class with javadoc that has a long hyperlink. Spotless wants to move the link to a new line to
limit the line length, but fails to keep the /// prefix needed for markdown javadoc.
/// Hello, World!
///
/// See [JEP_467:_Markdown_Documentation_Comments](https://openjdk.org/jeps/467#abcdefghijklmnopqrstuvwxyz)
public class Hello {}
After applying Spotless:
/// Hello, World!
///
/// See
// [JEP_467:_Markdown_Documentation_Comments](https://openjdk.org/jeps/467#abcdefghijklmnopqrstuvwxyz)
public class Hello {}
The link no longer appears in the javadoc.
The text was updated successfully, but these errors were encountered:
The choice of formatters will most likely have an impact on where the cause of this issue lies. Can you share an minimal, reproducible example with us?
Java code is as in the issue: src/main/java/Hello.java
/// Hello, World!
///
/// See [JEP_467:_Markdown_Documentation_Comments](https://openjdk.org/jeps/467#abcdefghijklmnopqrstuvwxyz)
public class Hello {}
After applying Spotless (gradle spotlessApply) the link is wrapped onto a new line without keeping the /// prefix required for markdown: src/main/java/Hello.java
/// Hello, World!
///
/// See
// [JEP_467:_Markdown_Documentation_Comments](https://openjdk.org/jeps/467#abcdefghijklmnopqrstuvwxyz)
public class Hello {}
Javadoc (gradle javadoc) is now missing the link: build/docs/javadoc/Hello.html
<p>Hello, World!</p>
<p>See</p>
Presumably googleJavaFormat needs to keep the /// prefix when wrapping long comments.
Java 23+ supports markdown for javadoc, as per JEP 467: Markdown Documentation Comments. Spotless breaks the markdown javadoc when it tries to reformat it.
Consider a class with javadoc that has a long hyperlink. Spotless wants to move the link to a new line to
limit the line length, but fails to keep the
///
prefix needed for markdown javadoc.After applying Spotless:
The link no longer appears in the javadoc.
The text was updated successfully, but these errors were encountered: