Skip to content

Commit 6ae78a4

Browse files
committed
Handle /// comments (#976)
JabRef follows a different style than the usual //
1 parent 1c0be46 commit 6ae78a4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/gr/uom/java/xmi/UMLComment.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ public void addPreviousLocation(LocationInfo info) {
5151
public String getText() {
5252
if(locationInfo.getCodeElementType().equals(CodeElementType.LINE_COMMENT)) {
5353
String text = new String(this.text);
54-
if(text.startsWith("//")) {
54+
if(text.startsWith("///")) {
55+
text = text.substring(3);
56+
}
57+
else if(text.startsWith("//")) {
5558
text = text.substring(2);
5659
}
5760
text = text.trim();
@@ -69,6 +72,9 @@ public String getText() {
6972
if(line.endsWith("*/")) {
7073
line = line.substring(0, line.length()-2);
7174
}
75+
if(line.startsWith("///")) {
76+
line = line.substring(3);
77+
}
7278
if(line.startsWith("//")) {
7379
line = line.substring(2);
7480
}

0 commit comments

Comments
 (0)