Module:History
From Vintage Story Wiki
Documentation for this module may be created at Module:History/doc
local p = {}
function p.create(f)
local args = require( 'Module:ProcessArgs' ).merge( true )
local header = '{| class="wikitable"\n!colspan="3"|History\n|-\n'
if args.header then
return header
end
local footer = '|}'
if args.footer then
return footer
end
local parentVer = args[1] or ''
local childVer = args[2]
local child = '||[[' .. childVer .. ']]'
local notes = '||' .. args[3]
local parent
local body
if parentVer then
parent = '|[[' .. parentVer .. ']]'
body = parent .. child .. notes .. '\n'
else
body = '|' .. child .. notes .. '\n'
end
return body
end
return p