Content deleted Content added
Fix border; consistent whitespace |
Section option |
||
Line 77:
nthe = nthe and (pref and "t" or "T").."he " or ""
local flink = args["plink"] or args["flink"] or alink or space2emp((pref or "").." ")..fthe..clink..space2emp(" "..(suff or ""))
local fsec = args["psection"] or args["section"]
local csec = args["csection"] or args["section"]
fsec = fsec and "#"..fsec or ""
csec = csec and "#"..csec or ""
local name = args["name"]
Line 141 ⟶ 145:
text = ""
elseif mn=="p" or mn=="f" then --prefix/suffix link
text = "[["..flink..fsec.."|"..name.."]]"
elseif mn=="b" then --both prefix/suffix and normal country link
if pref and suff then
text = "[["..flink..fsec.."|"..pref.."]] "..nthe.."[["..clink..csec.."|"..name.."]] [["..flink..fsec.."|"..suff.."]]"
elseif pref then
text = "[["..flink..fsec.."|"..pref.."]] "..nthe.."[["..clink..csec.."|"..name.."]]"
elseif suff then
text = nthe.."[["..clink..csec.."|"..name.."]] [["..flink..fsec.."|"..suff.."]]"
else
text = nthe.."[["..clink..csec.."|"..name.."]]"
end
elseif mn=="d" then --data template
Line 162 ⟶ 166:
text = name
else --country link (default)
text = "[["..clink..csec.."|"..name.."]]"
end
end
Line 170 ⟶ 174:
if not ilink then
if mi=="x" or (iname==placeholder and pimage~=placeholder) then --no image/invisible image
iname = placeholder
border = "" ilink = "|link=" am = "" elseif mi=="i" then --image page link
ilink = ""
elseif mi=="c" then --country link
ilink = "|link="..clink..csec
elseif mi=="p" or mi=="f" then --prefix/suffix link
ilink = "|link="..flink..fsec
elseif mi=="d" then --data template
--check if redirect
|