From 3a3b45be4a68ec391e25cce7cf0233d84617a59d Mon Sep 17 00:00:00 2001 From: azimut Date: Fri, 5 May 2023 15:52:30 -0300 Subject: [PATCH] fourchan: comment attachment to new line at the bottom --- internal/fourchan/format.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/fourchan/format.go b/internal/fourchan/format.go index c66f1de..f16f8a2 100644 --- a/internal/fourchan/format.go +++ b/internal/fourchan/format.go @@ -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) }