模組:重庆轨道交通出口标志

local p = {}

function p.main(frame)
	
	local code = frame:getParent().args[1]
	local len = mw.ustring.len(code)
	local seq = {}
	
	for i = 1, len do
		local c = mw.ustring.sub(code, i, i)
		
		if c == 'Q' then
			table.insert(seq, '[[File:CRT R B ' .. c .. '.svg|x20px|' .. c .. '|link=|class=crt-exit-descender]]')
		else
			table.insert(seq, '[[File:CRT R B ' .. c .. '.svg|x16px|' .. c .. '|link=]]')
		end
	end
	
	return table.concat(seq)
	
end

return p