-- start
local p =
local HtmlBuilder = require('Module:HtmlBuilder')
local root = HtmlBuilder.create
function p.col2_table(frame) local colspan = string.lower(frame.args[1]) local border = string.lower(frame.args[2]) if colspan
'y' then _table_.css('border', '1px') elseif border
'y' then local header = frame.args[3] local _table_ = root.tag('table') if border
'n' then _table_.css('border', '0px') else return 'Error in parameter 2, must be Y or N' end local tr1 = root.tag('tr') local th = root.tag('th') th.wikitext(header) th.attr('colspan', '2') root = th.done root = tr1.done local tr2 = root.tag('tr') local td1cont = frame.args[4] local td2cont = frame.args[5] local td1 = root.tag('td') td1.wikitext(td1cont) root = td1.done local td2 = root.tag('td') td2.wikitext(td2cont) root = td2.done root = tr2.done root = _table_.done else return 'Error in parameter 1, must be Y or N' end html = tostring(root) return htmlend
return p
-- end