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:
bf8f899
)
Change: less \n in the listing if no content
author
Niki Roo
<niki@nikiroo.be>
Mon, 19 Mar 2018 18:45:24 +0000
(19:45 +0100)
committer
Niki Roo
<niki@nikiroo.be>
Mon, 19 Mar 2018 18:45:24 +0000
(19:45 +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 7120dfac47f361011b9fbcf887af0003642765d3..51da87fb338f5ea4cd8fdc475a210035bf63f8a9 100644
(file)
--- a/
src/be/nikiroo/gofetch/output/Gopher.java
+++ b/
src/be/nikiroo/gofetch/output/Gopher.java
@@
-118,6
+118,7
@@
public class Gopher extends Output {
builder.append("\r\n");
appendJustified(builder, false, story.getFullContent(), " ");
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()) //
} else {
builder.append('0').append(story.getTitle()) //
.append('\t').append(story.getSelector()) //
@@
-127,11
+128,13
@@
public class Gopher extends Output {
appendJustified(builder, true, story.getDetails(), " ");
builder.append("i\r\n");
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;
}
return builder;
}