}
String gopherUrl = "gopher://" + hostname + sel + ":" + port;
-
+
StringBuilder builder = new StringBuilder();
appendPre(builder);
+ "</a>.</p>\n"//
+ "<p>They are simply scrapped from their associated webpage and updated a few times a day.</p>\n"//
);
-
+
appendPost(builder);
-
+
return builder.toString();
}
.append("<div class='comment' style='display: block; margin-left: 80px'>\n");
builder.append(space).append(" <h2>").append(comment.getTitle())
.append("</h2>\n");
- builder.append(space).append(" <div class='by'>")
+ builder.append(space).append(" <div class='by' style='font-style: italic;'>")
.append(comment.getAuthor()).append("</div>\n");
- builder.append(space).append(" <div class='comment_content'>")
- .append(comment.getContent()).append("</div>\n");
+ builder.append(space).append(" <div class='comment_content'>");
+ for (String line : comment.getContentLines()) {
+ builder.append("<p>" + line + "</p>");
+ }
+ builder.append("</div>\n");
for (Comment subComment : comment) {
appendHtml(builder, subComment, space + " ");
}
} else {
builder.append(" <h1>" + story.getTitle() + "</h1>\n");
}
- builder.append(" <div class='details'>(" + story.getDetails()
- + ")</div>\n");
+
+ builder.append(" <div class='details'>");
+ if (story.getDetails() != null && !story.getDetails().isEmpty()) {
+ builder.append("(").append(story.getDetails()).append(")");
+ }
+ builder.append("</div>\n");
builder.append(" <br/>\n");
if (!resume) {
if (resume) {
builder.append(" " + story.getContent() + "\n");
} else {
- builder.append(" " + story.getFullContent() + "\n");
+ builder.append(" "
+ + story.getFullContent().replace("\n", "<br/>")
+ .replace("[ ", "<h2>").replace(" ]", "</h2>")
+ + "\n");
}
builder.append(" </div>\n");