Module:Module introspection: Difference between revisions

Ganaram inukshuk (talk | contribs)
No edit summary
Ganaram inukshuk (talk | contribs)
move text for lack of code descriptions
Line 282: Line 282:
end
end
table.insert(lines, "|}")
table.insert(lines, "|}")
if not has_descriptions then
table.insert(lines, "''No function descriptions were provided. See the code if it has any descriptions.''")
end
return table.concat(lines, "\n")
return table.concat(lines, "\n")
Line 324: Line 320:
'| style="vertical-align:top; border-left:none" |',
'| style="vertical-align:top; border-left:none" |',
dep_table,
dep_table,
"|}"
}, "\n")
}, "\n")
-- Check whether descriptions was passed in
local has_descriptions = false
if type(descriptions) == "table" then
for _, _ in pairs(descriptions) do
has_descriptions = true
break
end
end
-- If no descriptions were provided, add text below that points to the code.
if not has_descriptions then
table.insert(lines, "''No function descriptions were provided. See the code if it has any descriptions.''")
end
table.insert(lines, "|}")


return combined_tables
return combined_tables