mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-10 04:19:56 +00:00
Keep indentations in javadoc. Fixes #1571
This commit is contained in:
@@ -74,7 +74,7 @@ public class DocCommentIntegrator {
|
||||
return out;
|
||||
}
|
||||
|
||||
private static final Pattern CONTENT_STRIPPER = Pattern.compile("^(?:\\s*\\*)?[ \\t]*(.*?)$", Pattern.MULTILINE);
|
||||
private static final Pattern CONTENT_STRIPPER = Pattern.compile("^(?:\\s*\\*)?(.*?)$", Pattern.MULTILINE);
|
||||
@SuppressWarnings("unchecked") private boolean attach(JCCompilationUnit top, final JCTree node, CommentInfo cmt) {
|
||||
String docCommentContent = cmt.content;
|
||||
if (docCommentContent.startsWith("/**")) docCommentContent = docCommentContent.substring(3);
|
||||
|
||||
@@ -9,6 +9,9 @@ package testPackage;
|
||||
class JavadocGenerally {
|
||||
/**
|
||||
* Doc on field
|
||||
* <pre>
|
||||
* // code
|
||||
* </pre>
|
||||
*/
|
||||
private int someField;
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,9 @@ package testPackage;
|
||||
class JavadocGenerally {
|
||||
/**
|
||||
* Doc on field
|
||||
* <pre>
|
||||
* // code
|
||||
* </pre>
|
||||
*/
|
||||
private int someField;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user