Module:Module introspection: Difference between revisions

Ganaram inukshuk (talk | contribs)
m add table header
Ganaram inukshuk (talk | contribs)
try to display tables side by side
Line 254: Line 254:
-- Return the tables as strings
-- Return the tables as strings
local summary = string.format("'''Introspection summary:''' Module:%s requires %d Lua module(s) and provides %d functions(s).", module_name, num_deps, #module_funcs)
local summary = string.format("'''Introspection summary:''' Module:%s requires %d Lua module(s) and provides %d functions(s).", module_name, num_deps, #module_funcs)
return summary .. "\n" .. dep_table .. "\n" .. func_table
local combined_tables = table.concat({
'{| style="width:100%"',
'| style="vertical-align:top; width:50%;" |',
dep_table,
'| style="vertical-align:top; width:50%;" |',
func_table,
'|}'
}, "\n")
 
return summary .. "\n" .. combined_tables
end
end


-- Wrapper function for modules
-- Wrapper function for modules