Module:Sandbox/BrandonXLF/3: Difference between revisions

Content deleted Content added
Undid revision 1060234373 by BrandonXLF (talk)
No edit summary
Line 5:
 
function getImage(frame, image)
if string.match(image, ".-%+.-") then
k, image = string.match(image, "(.-)%+(.-+)")
end
if true then
return image
end
 
local file = nil
 
if string.match(image, ".-%..*") then
file = frame:expandTemplate{title = "flagicon image", args = {image}}
elseif string.match(image, ".-%s%(.-%)") then
local country, var = string.match(image,"(.-)%s%((.-)%)")
file = frame:expandTemplate{title = "flagdeco", args = {country, var, noredlink = 'y'}}
else
file = frame:expandTemplate{title = "flagdeco", args = {image, noredlink = 'y'}}
end
 
Line 28 ⟶ 24:
 
function getCountry(country)
if string.match(country, ".-%+.-") then
country, _ = string.match(country, "(.-)%+(.-)")
end