Jump to content

Module:Redirect-multi

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Nihiltres (talk | contribs) at 20:16, 12 May 2016 (Something experimental to better handle edge cases…). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local mRedirectHatnote = require('Module:Redirect hatnote')
local mArguments = require('Module:Arguments')
local p = {}

function p.redirectMulti (frame)
	local args = mArguments.getArgs(frame)
	local numRedirects = tonumber(table.remove(args, 1)) or 1
	local options = {selfref = args.selfref}
	return mRedirectHatnote._redirect(args, numRedirects, options)
end

return p