Module:TableRow

From Voices of the Void Wiki
Jump to navigation Jump to search

Documentation for this module may be created at Module:TableRow/doc

local util_args = require('Module:ArgsUtil')

local p = {}

function p.main(frame)
    local args = util_args.merge(frame)
    local col1 = args.col1
    local col2 = tonumber(args.col2)
    local col3 = args[1]

    -- build the cells of a table row
    local out = mw.html.create('tr')
    out:tag('td'):wikitext(col1)
    out:tag('td'):wikitext(col2)
    out:tag('td'):wikitext(col3)
    return out
end

return p