fix(docs): missing @returns desc in _meta/api.lua #30673

This commit is contained in:
Justin M. Keyes
2024-10-05 08:52:57 -07:00
committed by GitHub
parent 0c9b3ef34d
commit 8801b77ed0
3 changed files with 267 additions and 98 deletions

View File

@@ -276,7 +276,7 @@ local function get_api_meta()
if not deprecated then
r.desc = fun.desc
r.return_desc = fun.returns[1].desc
r.returns_desc = fun.returns[1].desc
end
ret[fun.name] = r
@@ -370,10 +370,9 @@ local function render_api_meta(_f, fun, write)
end
if fun.returns ~= '' then
local ret_desc = fun.returns_desc and ' : ' .. fun.returns_desc or ''
ret_desc = util.md_to_vimdoc(ret_desc, 0, 0, 74)
local ret_desc = fun.returns_desc and ' # ' .. fun.returns_desc or ''
local ret = LUA_API_RETURN_OVERRIDES[fun.name] or fun.returns
write('--- @return ' .. ret .. ret_desc)
write(util.prefix('--- ', '@return ' .. ret .. ret_desc))
end
local param_str = table.concat(param_names, ', ')