Skip to content

Commit 091f28d

Browse files
author
zhourenjian
committed
Add support of "/-* ... *-/" in Javadoc to generate "/* ... */" javascript comment.
1 parent 05f375e commit 091f28d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/net/sf/j2s/core/astvisitors/ASTJ2SDocVisitor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ boolean readSources(BodyDeclaration node, String tagName, String prefix, String
224224
buf.append(text);
225225
buf.append("\r\n");
226226
}
227-
buffer.append(prefix + buf.toString().trim() + suffix);
227+
String sources = buf.toString().trim();
228+
sources = sources.replaceAll("(\\/)-\\*|\\*-(\\/)", "$1*$2").replaceAll("<@>", "@");
229+
buffer.append(prefix + sources + suffix);
228230
existed = true;
229231
}
230232
}

0 commit comments

Comments
 (0)