import be.nikiroo.gofetch.data.Comment;
import be.nikiroo.gofetch.data.Story;
-import be.nikiroo.gofetch.support.BasicSupport.Type;
+import be.nikiroo.gofetch.support.Type;
import be.nikiroo.utils.StringUtils;
import be.nikiroo.utils.StringUtils.Alignment;
}
appendLeft(builder, menu, comment.getTitle(), "** ", " ", space);
- appendLeft(builder, menu, "(" + comment.getAuthor() + ")", " ",
- " ", space);
- builder.append((menu ? "i" : "") + "\r\n");
+ if (comment.getAuthor() != null
+ && !comment.getAuthor().trim().isEmpty()) {
+ appendLeft(builder, menu, "(" + comment.getAuthor() + ")", " ",
+ " ", space);
+ builder.append((menu ? "i" : "") + "\r\n");
+ }
for (String line : comment.getContentLines()) {
int depth = 0;
builder.append("\r\n");
appendJustified(builder, false, story.getFullContent(), " ");
+ builder.append("\r\n");
} else {
builder.append('0').append(story.getTitle()) //
.append('\t').append(story.getSelector()) //
appendJustified(builder, true, story.getDetails(), " ");
builder.append("i\r\n");
- appendJustified(builder, true, story.getContent(), " ");
+ String content = story.getContent();
+ if (!content.isEmpty()) {
+ appendJustified(builder, true, content, " ");
+ builder.append("i\r\n");
+ }
}
- builder.append(resume ? "i" : "").append("\r\n");
-
return builder;
}