From: Simon Tatham Date: Sun, 3 Dec 2023 07:14:29 +0000 (+0000) Subject: Avoid ugly double blank line in media-only posts. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=7bef901c54d2dd7346231a19edd02ebff0062dfc;p=mastodonochrome.git Avoid ugly double blank line in media-only posts. --- diff --git a/client.py b/client.py index 1a05115..ac35589 100644 --- a/client.py +++ b/client.py @@ -140,6 +140,7 @@ class Status: self.booster['display_name']) yield text.BlankLine() yield from self.content - yield text.BlankLine() + if len(self.content) > 0: + yield text.BlankLine() for media in self.media: yield text.Media(media['url'], media.get('description'))