Module:Sandbox/The Mol Man

local p = {}

function p.main(frame) local args = frame:getParent.args local params = { 1, 2, 3, 'e', 'u', 'ul', 'up', 'upl', 'p', 's', 'end', 'errend', '+errend', '-errend', 'fmt', 'nocategory' } local ret_t = {} for _, v in ipairs(params) do		if args[v] then local av = frame:preprocess(args[v]) if type(v) == 'number' then table.insert(ret_t,'|') table.insert(ret_t,av) else table.insert(ret_t,'|'..v..'=') table.insert(ret_t,av) end end end table.insert(ret_t,'}}') ret_t = table.concat(ret_t) local ret = mw.html.create('tr') :tag('td') :attr('rowspan','2') :wikitext('{{Val'..ret_t:gsub('&([%a]-);','&amp;%1;')) :done :tag('td') :wikitext(frame:preprocess('{{Val'..ret_t)) :done :done :tag('tr') :tag('td') :wikitext(frame:preprocess('{{Val/sandbox'..ret_t)) :done :done :done return ret end

return p