Content deleted Content added
Undefined variable reference checking could have helped! |
m Formatting; comments |
||
Line 100:
function p.luacode(args, skipHyphenSplit)
local country, subdivision = args[1], args[2]
if not skipHyphenSplit then
Line 109:
end
if country then country = p.strip(country) end
if subdivision then subdivision = p.strip(subdivision) end
if args["codetype"]=="3" then
Line 175 ⟶ 171:
local args = getArgs(frame)
local unhyphenateResult = p.luacode(args) -- Prioritize splitting on hyphen (subdivision)
if unhyphenateResult ~= nil and unhyphenateResult ~= '' then
return unhyphenateResult
end
if string.find(args[1] or '', "%-") then -- If
local keepHyphenResult = p.luacode(args, true)
return keepHyphenResult or ''
end
return ''
end
|