Module:Sandbox/KockaAdmiralac/PRs

local p = {} local data = mw.loadData('Module:Sandbox/KockaAdmiralac/PRs/Data')

function p.main(frame) local html = mw.html.create('table') :css({           ["text-align"] = 'center',            ["width"]      = '100%'        }) :addClass('wikitable') local curr local temp for k, v in ipairs(args) do       local n = tonumber(k) if n % 4 == 0 then curr = html:tag('tr') temp = v       elseif n % 4 == 1 then curr:tag('td') :wikitext( .. v .. ) :done elseif n % 4 == 2 then curr:tag('td') :wikitext(v) :done else local i = tonumber(v) curr:tag('td') :tag('span') :css('color', '#' .. data.colors[i]) :wikitext(data.text[i]) :done :done :done end end return tostring(html:done) end

return p