Jump to content

Module:WMFRLuaHarmoniaInternal

Unchecked
From Wikipedia

Documentation for this module may be created at Module:WMFRLuaHarmoniaInternal/doc

local p = {}

function p.internal(frame, msg)
	local args = frame:getParent().args
	local repet =tonumber(args[2])
	if repet < 0 then
		error('Nombre de répétitions négatif')
	elseif repet > 10 then
		error ('Nombre de répétitions trop important')
	else
		local result = '' 
		for iter = 1, repet, 2 do
			result = result .. '#' .. msg .. args[1] .. '!' .. args['baz'] .. 'et' .. args['bar'] .. '\n'
		end
		return result:gsub('Wiki','W') --si dans mon return il appelle un args qui contient 'Wiki' je veux qu'il remplace ça par 'W'
	end
end

return p