Module:ISO 3166/sandbox: Difference between revisions

Content deleted Content added
m formatting
Fail faster if parameter exists but is blank
Line 116:
or '[[Category:Wikipedia page with obscure subdivision]]'
if not (code1 or "") == "" then
if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end
return catnocountry, '<span style="font-size:100%" class="error">"No parameter for the country given"</span>'
end
if not (code2 or "") == "" then --3166-1 code
for alpha2,cdata in pairs(data) do
if findname(alpha2,cdata,code1) then