Module:Param Parse: Difference between revisions
Redirect to `_(episode)` if available
mNo edit summary |
(Redirect to `_(episode)` if available) |
||
Line 132:
local valid_episode = valid_episodes[string.lower(episode or '')]
if valid_episode then
-- Check if the page with '(episode)' exists
if mw.title.new(page_name).exists then
return '[[File:'..valid_episode..' episode icon.png|18px]] [['..page_name..']]'
else
-- Fallback to the original episode name
return '[[File:'..valid_episode..' episode icon.png|18px]] [['..valid_episode..']]'
end
end
return nil
end
|