Jump to content

Module:Revisions until removed

From Wikipedia, the free encyclopedia
local p = {}
local getArgs = require('Module:Arguments').getArgs

function p.main(frame)
	local args = getArgs(frame)
	local num = tonumber(args['1'] or 2)
	num = num - 1
	if num > 0 then
		return '{{subst:revisions until removed|'..tostring(num)..'}}'
	else
		return '<!--{{subst:revisions until removed|'..tostring(num)..'}}-->'
	end
end

return p