Skip to content

Commit 3e5006a

Browse files
committed
1 parent 885d08c commit 3e5006a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/de/halirutan/mathematica/lang/psi/util/Comments.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ public static CommentStyle getStyle(@NotNull final PsiComment comment) {
9191

9292
public static String getStrippedText(@NotNull final PsiComment comment) {
9393
String text = comment.getText();
94-
assert text.length() >= 4; // we need at least this (**), should never happen!
95-
return text.substring(2, text.length() - 2).trim();
94+
return text != null && text.length() >= 4 ? text.substring(2, text.length() - 2).trim() : "";
9695
}
9796

9897
public enum CommentStyle implements Comparable<CommentStyle> {

0 commit comments

Comments
 (0)