Module:Module introspection: Difference between revisions

Ganaram inukshuk (talk | contribs)
mNo edit summary
Ganaram inukshuk (talk | contribs)
bugfix
Line 223: Line 223:
function p.make_function_table(module_name, module_funcs, descriptions, main_function)
function p.make_function_table(module_name, module_funcs, descriptions, main_function)
local has_descriptions = descriptions ~= nil
-- Check whether descriptions was passed in
if has_descriptions then
local has_descriptions = false
has_descriptions = has_descriptions and #descriptions > 0
if type(descriptions) == "table" then
for _, _ in pairs(descriptions) do
has_descriptions = true
break
end
end
end
Line 274: Line 278:
if has_descriptions then
if has_descriptions then
table.insert(lines, "| %s", descriptions[info.name] or "")
table.insert(lines, "| " .. (descriptions[info.name] or ""))
end
end
end
end