跳转到内容

模組:Definition list 2

维基百科,自由的百科全书
local p = {}

function p.main( frame )
	local args = require( 'Module:Arguments' ).getArgs( frame, { wrappers = 'Template:Definition list 2' } )
	
	local result = '<dl style="margin-left: 0;">'
	
	for key, value in ipairs( args ) do
		result = (key % 2 == 1) and result..'<dt>'..value..'</dt>' or result..'<dd style="margin-left: 0;">\n'..value..'\n</dd>'
	end
	
	result = result..'</dl>'

	return result
end

return p