Module:Infobox/Widget/List

From TwogPedia
Revision as of 08:01, 24 October 2022 by Couchor (talk | contribs)

Documentation for this module may be created at Module:Infobox/Widget/List/doc

local List = {}

function List.make(arr)
	local container = mw.html.create('div')
	local array = mw.text.split(arr, ',')
	
	for i, v in ipairs(array) do
		v = mw.text.trim(v)
		local div = mw.html.create('div')
			:wikitext('[[' .. v .. ']]')
		container:node(div)
	end
	return container
end

return List