aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/docgen.lua16
1 files changed, 1 insertions, 15 deletions
diff --git a/scripts/docgen.lua b/scripts/docgen.lua
index 538ed2ad..04bbd6cc 100755
--- a/scripts/docgen.lua
+++ b/scripts/docgen.lua
@@ -35,21 +35,7 @@ local function map_sorted(t, func)
end
local function indent(n, s)
- local prefix
- if type(n) == 'number' then
- if n <= 0 then
- return s
- end
- prefix = string.rep(' ', n)
- else
- assert(type(n) == 'string', 'n must be number or string')
- prefix = n
- end
- local lines = vim.split(s, '\n')
- for i, line in ipairs(lines) do
- lines[i] = prefix .. line
- end
- return table.concat(lines, '\n')
+ return vim.text.indent(n, s)
end
local function make_parts(fns)