Module:MultiReplace: Difference between revisions

Content deleted Content added
Better readable p.main
Allow a call from Lua without curly braces
Line 45:
end
 
function p.main(frame, ...)
local args =
if type(frame.args) ~= 'table' thenand {frame, ...} or
type(frame.args) ~= 'table' and frame or
elseif frame.args[1] thenand frame.args or
args = frame:getParent().args
else
args = frame:getParent().args
end
return MultiReplace(args)
end