From 851dd31054f7ff1ef37a59129627a0aee59a8224 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Wed, 29 Nov 2023 19:55:04 +0100 Subject: Keep paragraphs separated in description output --- mga-advisor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mga-advisor.py b/mga-advisor.py index 2e650c7..86a6e80 100644 --- a/mga-advisor.py +++ b/mga-advisor.py @@ -211,7 +211,10 @@ class Widget(QWidget): srcs[rel][repo].append(self.sanitize_line(name)) data['src'] = srcs if len(self.ui.description_te.toPlainText()) != 0: - lines_desc = wrap(self.ui.description_te.toPlainText(), width=72, break_on_hyphens=False) + paragraphs = self.ui.description_te.toPlainText().split("\n") + lines_desc = [] + for paragraph in paragraphs: + lines_desc += wrap(paragraph, width=72, break_on_hyphens=False) data['description'] = literal_str("\n".join(lines_desc)) refs = [] if self.ui.list_ref.count(): -- cgit v1.2.1