git://git.nikiroo.be
/
gofetch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Phoronix: fix first comment is article copy
[gofetch.git]
/
src
/
be
/
nikiroo
/
gofetch
/
output
/
Gopher.java
diff --git
a/src/be/nikiroo/gofetch/output/Gopher.java
b/src/be/nikiroo/gofetch/output/Gopher.java
index 51da87fb338f5ea4cd8fdc475a210035bf63f8a9..12a420cd84482b988cde4775c6b29f3962fe574b 100644
(file)
--- a/
src/be/nikiroo/gofetch/output/Gopher.java
+++ b/
src/be/nikiroo/gofetch/output/Gopher.java
@@
-2,7
+2,7
@@
package be.nikiroo.gofetch.output;
import be.nikiroo.gofetch.data.Comment;
import be.nikiroo.gofetch.data.Story;
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;
import be.nikiroo.utils.StringUtils;
import be.nikiroo.utils.StringUtils.Alignment;
@@
-68,10
+68,13
@@
public class Gopher extends Output {
}
appendLeft(builder, menu, comment.getTitle(), "** ", " ", space);
}
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;
for (String line : comment.getContentLines()) {
int depth = 0;