Skip to content

Commit

Permalink
lobsters: remove empty spaces if no op message
Browse files Browse the repository at this point in the history
  • Loading branch information
azimut committed May 5, 2023
1 parent 8bafc3a commit f80f239
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions internal/lobsters/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ func (o Op) String() (ret string) {
ret += fmt.Sprintf("title: %s\n", o.title)
ret += fmt.Sprintf(" self: %s\n", o.self)
if o.url != "" {
ret += fmt.Sprintf(" url: %s\n", o.url)
ret += fmt.Sprintf(" url: %s\n\n", o.url)
}
if o.message != "" {
ret += fmt.Sprintf(
"\n%s\n\n",
format.FormatText(o.message, o.thread.LineWidth, o.thread.LeftPadding),
)
}
ret += fmt.Sprintf(
"\n%s\n\n",
format.FormatText(o.message, o.thread.LineWidth, o.thread.LeftPadding),
)
ret += fmt.Sprintf(
"%s - %s \n\n\n",
format.AuthorStyle.Render(o.username),
Expand Down

0 comments on commit f80f239

Please sign in to comment.