Module:Aligned table: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
local align = {} | local align = {} | ||
local cols = tonumber(args['cols'] or '2') | local cols = tonumber(args['cols'] or '2') | ||
local class = args['class'] or '' | |||
local style = args['style'] or '' | local style = args['style'] or '' | ||
if | if class ~= '' then | ||
class = ' class="' .. class .. '"' | |||
end | end | ||
Line 34: | Line 35: | ||
end | end | ||
end | end | ||
return '<table' .. style ..'>\n' .. table.concat( entries, '\n' ) .. '\n</table>' | return '<table' .. class .. style ..'>\n' .. table.concat( entries, '\n' ) .. '\n</table>' | ||
end | end | ||
return p | return p |