Module:Aligned table: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 48: | Line 48: | ||
if type( k ) == 'number' then | if type( k ) == 'number' then | ||
i = math.fmod(k-1,cols) + 1 | i = math.fmod(k-1,cols) + 1 | ||
entries[ k ] = '<td class="' .. colclass[i] .. '" style="' .. colstyle[i] .. '">' .. v .. '</td>' | local j = (k - i) / cols | ||
if args['class' .. tostring(j) .. '.' .. tostring(i)] then | |||
entries[ k ] = '<td class="' .. args['class' .. tostring(j) .. '.' .. tostring(i)] .. '" style="' .. colstyle[i] .. '">' .. v .. '</td>' | |||
else | |||
entries[ k ] = '<td class="' .. colclass[i] .. '" style="' .. colstyle[i] .. '">' .. v .. '</td>' | |||
end | |||
if i == 1 then | if i == 1 then | ||
entries[ k ] = '<tr style="vertical-align:top">' .. entries[ k ] | entries[ k ] = '<tr style="vertical-align:top">' .. entries[ k ] |