모듈:Kwj2772/Sandbox

위키백과, 우리 모두의 백과사전.
local p= {}

p.generateLicenseMetadata = function (frame)
	local inputs = {
		short = frame.args['licensetpl_short'] or frame.args['short'],
		long = frame.args['licensetpl_long'] or frame.args['long'],
		link = frame.args['licensetpl_link'] or frame.args['link'],
		link_req = frame.args['licensetpl_link_req'] or frame.args['link_req'],
		attr_req = frame.args['licensetpl_attr_req'] or frame.args['attr_req']
	}
	local out = ''
	for k, v in pairs(inputs) do
		local span = mw.html.create('span')
		span:addClass('licensetpl_'.. k)
		:css('display', 'none')
		:wikitext(mw.text.nowiki( v ))
		out = out .. tostring(span) .. '<!--\n-->'
	end
	return out
end

	

return p