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

Content deleted Content added
Jackmcbarn (talk | contribs)
Create sandbox version of Module:TreeChart/data
 
Jackmcbarn (talk | contribs)
render the html in the data module, so it only has to happen once per page
Line 3:
local DOT = '1px dotted black'
 
local data = {
return {
['!'] = {
t = { { attr = { rowspan = '2' }, style = { ['border-right'] = SLD, width = '1em', height = '2em' } },
Line 352:
}
}
 
local retval = {}
 
for k,v in pairs(data) do
retval[k] = {}
for k2,v2 in pairs(v) do
retval[k][k2] = tostring(mw.html.create('td', {selfClosing = true}):css(v2.style or {}):attr(v2.attr or {}))
end
end
 
return {retval