summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2023-11-29 19:55:04 +0100
committerPapoteur <papoteur@mageia.org>2023-11-29 19:55:04 +0100
commit851dd31054f7ff1ef37a59129627a0aee59a8224 (patch)
tree6a986d0b8156e4c3ce66d7303e2c1566f763c964
parent88278e3ece78f7e208caf1887660160933d0800e (diff)
downloadmga-advisor-851dd31054f7ff1ef37a59129627a0aee59a8224.tar
mga-advisor-851dd31054f7ff1ef37a59129627a0aee59a8224.tar.gz
mga-advisor-851dd31054f7ff1ef37a59129627a0aee59a8224.tar.bz2
mga-advisor-851dd31054f7ff1ef37a59129627a0aee59a8224.tar.xz
mga-advisor-851dd31054f7ff1ef37a59129627a0aee59a8224.zip
Keep paragraphs separated in description output
-rw-r--r--mga-advisor.py5
1 files changed, 4 insertions, 1 deletions
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():