Module:Infobox television season name/sandbox2: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 57:
--- @param title string The article's title.
--- @return string | nil
local function getSeasonNumberNewgetSeasonNumber(title)
return match(title , "%d+", 1, -1, false, "")
end
Line 196:
local function getArticleTitleAndPipedLink(title, seasonNumberDiff)
local seasonType = getSeasonType(title)
local seasonNumber = getSeasonNumberNewgetSeasonNumber(title)
if tonumber(seasonNumber) == nil then
return "", nil
Line 362:
local title = getTitle(frame)
local titleWithoutDisambiguation = getTitleWithoutDisambiguation(title)
seasonNumber = getSeasonNumberNewgetSeasonNumber(titleWithoutDisambiguation)
seasonType = getSeasonType(titleWithoutDisambiguation)
-- For pages like "Doctor Who specials (2008–2010)".
if seasonType == "specials" then
returnlocal disambiguation = getDisambiguation(title) or "" .. " " .. seasonType
return disambiguation .. " " .. seasonType
end
seasonType = seasonType:sub(1, 1):upper() .. seasonType:sub(2)
Line 403 ⟶ 404:
local title = getTitle(frame)
local showName = getShowName(getTitleWithoutDisambiguation(title))
mw.log(title)
mw.log(showName)
if showName then
local disambiguation = getDisambiguation(title)
if disambiguation then
mw.log(showName)
disambiguation = " (" .. disambiguation .. ")"
end