Module:Interprovincial highway: Difference between revisions

Content deleted Content added
Show error for unknown type
Only show the shield when it exists and show "Terminus"
Line 24:
end
if shield and shield ~= '' then
out = out .. string.format('[[File:%s|15px|alt=%s]]', shield, alt) .. ' '
end
if not link or link == '' then
out = out .. ' ' .. label
else
out = out .. ' ' .. string.format('[[%s|%s]]', link, label)
end
if out ~= '' then
out = "'''" .. out .. "'''"
end
return "'''" .. out .. "'''"
end
 
Line 71 ⟶ 77:
local out = ''
while templateArgs[prefix .. index] or (index == 1 and templateArgs[prefix ]) do
repeat
local route = templateArgs[prefix .. index]
or (index == 1 and templateArgs[prefix] or '')
Line 88 ⟶ 94:
index = index + 1
end
until not templateArgs[prefix .. index]
if out == '' then
return "'''Terminus'''"
end
return label .. ' ' .. (index - 1 > 1 and 'routes' or 'route') .. '<br>' .. out