Module:Redirect-distinguish-for explained
mArguments = require('Module:Arguments')mRedirectHatnote = require("Module:Redirect hatnote")
local p =
function p.redirectDistinguishFor(frame) local args = mArguments.getArgs(frame,) local maxArg = 0 for k, v in pairs(args) do if type(k)
'number' and k > maxArg then maxArg = k end end local parsedArgs = for i = 1, maxArg do if i ~= 2 then parsedArgs[i == 1 and 1 or i - 1] = args[i] end end return (string.gsub(--Note that the outer parentheses are necessary! mRedirectHatnote._redirect(parsedArgs, 1,), "(redirects? here.)", "%1 Not to be confused with .", 1 ))end
return p