Module:MultiReplace: Difference between revisions

Content deleted Content added
Call Module:Error to avoid copy&paste programming
sync from sandbox. Allow call by direct invocation.
Line 1:
p = {}
 
local function p.mainMultiReplace(frameargs)
local args = frame:getParent().args
local input = args[1] or "{{{1}}}"
local plain = args.plain == "yes"
Line 44 ⟶ 43:
end
return result
end
 
function p.main(frame)
local args
if type(frame.args) == 'table' then
if frame.args[1] then
args = frame.args
if args[1] == '' then
args[1] = frame:getParent().args[1]
end
else
local args = frame:getParent().args
end
else
args = frame
end
return MultiReplace(args)
end