fix(scripts): use compatible tbl_flatten in docgen (#3171)

This commit is contained in:
glepnir 2024-05-23 15:18:03 +08:00 committed by GitHub
parent eadcee1573
commit 772b01a1de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,15 +39,12 @@ local function indent(n, s)
end
local function make_parts(fns)
return vim
.iter(fns)
:map(function(v)
if type(v) == 'function' then
v = v()
end
return { v }
end)
:totable()
return util.tbl_flatten(map_list(fns, function(v)
if type(v) == 'function' then
v = v()
end
return { v }
end))
end
local function make_section(indentlvl, sep, parts)