Jump to content

Module:Video game release

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ferret (talk | contribs) at 17:32, 14 March 2017 (getalias since we only want alias, not the rest.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

--require('Module:No globals')

local getArgs = require('Module:Arguments').getArgs
local cd = require('Module:CountryData')
local p = {}

function p.main(frame)
	local args = getArgs(frame)
	return p._main(args)
end

function p._main(args)
	local out = "<ul style=\"list-style: none none; line-height: inherit; margin: 0px;\">"
	
	local i = 1
	local j = i+1
    while args[i] and args[j] do
    	local label = '';

    	local cdalias = cd.getalias(frame,args[i],"alias")
    	if(cdalias ~= nil and cdalias ~= '') then
    		label = "[[" .. cdalias .. "|" .. args[i] .. "]]"
		else
			label = args[i]
		end
		
		out = out .. "<li><span style=\"font-size:95%;\">" .. label .. ":</span> " .. args[j] .. "</li>"
      
		i = j + 1
		j = i + 1
    end
    
    out = out .. "</ul>"
    
    return out
end

return p