Content deleted Content added
No edit summary |
No edit summary |
||
Line 194:
--- @return string, string
local function getArticleTitleAndPipedLink(title, seasonNumberDiff)
local disambiguation = getDisambiguation(title)▼
local seasonType = getSeasonType(title)
local seasonNumber = getSeasonNumberNew(title)
if tonumber(seasonNumber) == nil then
return "", nil
end
seasonNumber = seasonNumber + seasonNumberDiff
local modifiedTitle = string.gsub(title, "%d+$", seasonNumber)
pipedLink = seasonType:gsub("^%l", string.upper) .. " " .. seasonNumber
▲ local disambiguation = getDisambiguation(title)
-- Titles such as "Big Brother 1 (American season)".
if
return
-- Titles such as "Big Brother Brasil 1".
elseif
return
-- Invalid usages of TV series articles with the television season infobox.
Line 227 ⟶ 216:
return "", nil
-- Standard titles such as "Lost
else
return modifiedTitle, pipedLink
end
end
Line 266 ⟶ 253:
local title = getTitle(frame)
local articleTitle, pipedLink = getArticleTitleAndPipedLink(title, seasonNumberDiff)
return getArticleLink(articleTitle, pipedLink)
end
|