wordwrap: make list indenting smarter, to produce something with enough structure that it can be converted into AppStream metadata

This commit is contained in:
Nicolas Mailhot 2019-07-08 00:30:14 +02:00
parent 1e9cb0e970
commit 1f7310110e
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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 <zebob.m@gmail.com> - 136-1
- Revert "Fix expansion in listfiles_exclude/listfiles_include"