Content deleted Content added
Prune code duplication |
<sync with main> |
||
Line 550:
if linked then
if sitelink then
--
-- we could also check other wikis that prefer to use label:
local pos = sitelink:find(":") or 0▼
if site ~= "Wikimedia Commons" then
label = sitelink:sub(pos+1):gsub("%s%(.+%)$", ""):gsub(",.+$", "")▼
-- strip any namespace or dab from the sitelink
-- and use that as label
▲ local pos = sitelink:find(":") or 0
▲ label = sitelink:sub(pos+1):gsub("%s%(.+%)$", ""):gsub(",.+$", "")
end
out[#out + 1] = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. label .. "]]"
elseif islabel then
|