Module:Redirect hatnote: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content deleted Content added
Reimplemented without capitalization error |
Added tracking for and-gaps |
||
Line 63: | Line 63: | ||
local page = args[iArg + 1] |
local page = args[iArg + 1] |
||
local nextUse = args[iArg + 2] |
local nextUse = args[iArg + 2] |
||
--Tracking for and-gaps |
|||
if (page == nil) and (nextUse == 'and' or use == 'and') then |
|||
--It's an "unusual cat". Get it? :P |
|||
local cheshire = '[[Category:Hatnote templates using unusual parameters]]' |
|||
if use ~= nil and use ~= 'and' then |
|||
use = use .. cheshire |
|||
elseif useTable.use ~= nil then |
|||
useTable.use = useTable.use .. cheshire |
|||
else |
|||
--Previous tracking suggests this won't change behaviour in |
|||
--practice, for any extant uses, but it does change behaviour in |
|||
--theory. |
|||
use = 'other uses' .. cheshire |
|||
end |
|||
end |
|||
pages[#pages + 1] = page |
pages[#pages + 1] = page |
||
useTable.pages = pages |
useTable.pages = pages |