Module:Infobox: Difference between revisions

Ganaram inukshuk (talk | contribs)
bugfix
Ganaram inukshuk (talk | contribs)
No edit summary
Line 80: Line 80:
table.insert(lines, '|-')
table.insert(lines, '|-')
table.insert(lines, '| colspan="2" style="text-align: center;" | ' .. header)
table.insert(lines, '| colspan="2" style="text-align: center;" | ' .. header)
return table.concat(lines, "\n")
elseif data and not header then
local lines = {}
table.insert(lines, '|-')
table.insert(lines, '| colspan="2" style="text-align: center;" | ' .. data)
return table.concat(lines, "\n")
return table.concat(lines, "\n")
Line 209: Line 215:
-- rows and/or headers. This may be increased to 40 if needed.
-- rows and/or headers. This may be increased to 40 if needed.
args["Rows"] = tiu.header_data_pairs_to_table(args, 30)
args["Rows"] = tiu.header_data_pairs_to_table(args, 30)
local result = p._infobox(args)
local result = p._infobox(args)