Module:Aligned table: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
local colstyle = {} | local colstyle = {} | ||
local cols = tonumber(args['cols']) or 2 | local cols = tonumber(args['cols']) or 2 | ||
-- create the root table | -- create the root table | ||
Line 114: | Line 113: | ||
row:css('vertical-align', 'top') | row:css('vertical-align', 'top') | ||
end | end | ||
-- loop over the cells in each row | |||
-- loop over the cells in | |||
for i=1,cols do | for i=1,cols do | ||
local cell | local cell | ||
Line 160: | Line 147: | ||
end | end | ||
end | end | ||
cell:wikitext(mw.ustring.gsub(args[cols*(j - 1) + i] or '',' | cell:wikitext(mw.ustring.gsub(args[cols*(j - 1) + i] or '','%s*$', '')) | ||
end | end | ||
end | end |