Ensure multiline replies are wrapped and printed

This commit is contained in:
asdf 2021-08-29 10:23:58 +10:00
parent a1b660a7cd
commit 7bd1974f0f
1 changed files with 5 additions and 5 deletions

View File

@ -144,11 +144,11 @@ def view_post(post, cols) -> list[str]:
sep=" ", timespec="minutes"
)
reply_text = replies[6]
body.append(
line_wrapper.fill(
" {} {}: {}".format(reply_date, reply_author, reply_text)
)
)
wrapped_reply = line_wrapper.fill(
" {} {}: {}".format(reply_date, reply_author, reply_text)
).splitlines()
for line in wrapped_reply:
body.append(line)
else:
body.append("\n No replies yet. Be the first!")
return body