From 772b01a1de6b2ccca68e01e9c8ccdb18c1eff738 Mon Sep 17 00:00:00 2001 From: glepnir Date: Thu, 23 May 2024 15:18:03 +0800 Subject: [PATCH] fix(scripts): use compatible tbl_flatten in docgen (#3171) --- scripts/docgen.lua | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/docgen.lua b/scripts/docgen.lua index f8ddcdb9..1417e345 100644 --- a/scripts/docgen.lua +++ b/scripts/docgen.lua @@ -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)