From df1e439c5766c0410c414dfcf60d3b314fad3d0c Mon Sep 17 00:00:00 2001 From: John Helmert Date: Tue, 2 Jul 2019 17:58:19 -0500 Subject: [PATCH] Fix improper format on user pages with compact mode --- tuir/subreddit_page.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tuir/subreddit_page.py b/tuir/subreddit_page.py index 449a211..c65d1d2 100644 --- a/tuir/subreddit_page.py +++ b/tuir/subreddit_page.py @@ -337,7 +337,10 @@ class SubredditPage(Page): sub_attr = self.term.attr('SubmissionTitle') if offset in valid_rows: - self.term.add_line(win, '{title}'.format(**data), offset, 1, attr=sub_attr) + # On user pages, comments are displayed as the title. + # The raw data has newlines, so we display just the first line + title = data['title'].split('\n')[0] + self.term.add_line(win, '{0}'.format(title), offset, 1, attr=sub_attr) offset += 1 # Next row