Skip to content

Commit

Permalink
fourchan: comment attachment to new line at the bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
azimut committed May 5, 2023
1 parent 01c4666 commit 3a3b45b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/fourchan/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,15 @@ func (post Post) String() (ret string) {
}

ret += strings.Repeat(" ", post.depth*3)
if post.attachment.filename == "" {
ret += fmt.Sprintf(">> %-13s", humanize.Time(post.created))
} else {
ret += fmt.Sprintf(">> %-13s | %s (%s)",
humanize.Time(post.created),
ret += fmt.Sprintf(">> %s\n", humanize.Time(post.created))
if post.attachment.filename != "" {
ret += strings.Repeat(" ", post.depth*3)
ret += fmt.Sprintf(">> %s (%s)\n",
post.attachment.url,
post.attachment.filename,
)
}
ret += "\n\n"
ret += "\n"
for _, reply := range post.replies {
ret += fmt.Sprint(reply)
}
Expand Down

0 comments on commit 3a3b45b

Please sign in to comment.