Module:Tree chart/data/sandbox: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
render the html in the data module, so it only has to happen once per page
Jackmcbarn (talk | contribs)
fix rendering
Line 358:
retval[k] = {}
for k2,v2 in pairs(v) do
local renderedCells = {}
retval[k][k2] = tostring(mw.html.create('td', {selfClosing = true}):css(v2.style or {}):attr(v2.attr or {}))
for k3,v3 in ipairs(v2) do
retval renderedCells[k][k2k3] = tostring(mw.html.create('td', {selfClosing = true}):css(v2v3.style or {}):attr(v2v3.attr or {}))
end
retval[k][k2] = table.concat(renderedCells)
end
end