git://git.nikiroo.be
/
gofetch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
708b264
)
Visually improve comment without author (Gopher)
author
Niki Roo
<niki@nikiroo.be>
Fri, 23 Mar 2018 22:21:24 +0000
(23:21 +0100)
committer
Niki Roo
<niki@nikiroo.be>
Fri, 23 Mar 2018 22:21:24 +0000
(23:21 +0100)
src/be/nikiroo/gofetch/output/Gopher.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/gofetch/output/Gopher.java
b/src/be/nikiroo/gofetch/output/Gopher.java
index 51da87fb338f5ea4cd8fdc475a210035bf63f8a9..f0c6f6dad69d90d2dd09d20baad1b4fec82fca67 100644
(file)
--- a/
src/be/nikiroo/gofetch/output/Gopher.java
+++ b/
src/be/nikiroo/gofetch/output/Gopher.java
@@
-68,10
+68,13
@@
public class Gopher extends Output {
}
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;