From 1f7310110e6d16ae187c11107779000e7a6dcaed Mon Sep 17 00:00:00 2001 From: Nicolas Mailhot Date: Mon, 8 Jul 2019 00:30:14 +0200 Subject: [PATCH] wordwrap: make list indenting smarter, to produce something with enough structure that it can be converted into AppStream metadata --- common.lua | 6 +++++- redhat-rpm-config.spec | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common.lua b/common.lua index 0f28a8d..e087a1c 100644 --- a/common.lua +++ b/common.lua @@ -154,7 +154,11 @@ local function wordwrap(text) wl = bad end if (pos == 0) then - advance = string.gsub(word, "^(%s*).*", "%1") + advance, n = string.gsub(word, "^(%s*– ).*", "%1") + if (n == 0) then + advance = string.gsub(word, "^(%s*).*", "%1") + end + advance = string.gsub(advance, "– ", " ") pos = pos + wl elseif (pos + wl < 81) then pos = pos + wl diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index e95837d..13d4662 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -202,6 +202,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %{_rpmconfigdir}/macros.d/macros.kmp %changelog +- wordwrap: make list indenting smarter, to produce something with enough + structure that it can be converted into AppStream metadata + * Mon Jul 08 2019 Robert-André Mauchin - 136-1 - Revert "Fix expansion in listfiles_exclude/listfiles_include"