Module:MultiReplace/sandbox: Difference between revisions

Content deleted Content added
Sync error code from main
add unstrip option
 
(One intermediate revision by the same user not shown)
Line 3:
local function MultiReplace(args)
local input = args[1] or "{{{1}}}"
if args.unstrip == "yes" then input = mw.text.unstrip(input) end
local plain = args.plain == "yes"
 
Line 45 ⟶ 47:
end
 
function p.main(frame, ...)
local args =
if type(frame.args) =~= 'table' thenand {frame, ...} or
if type(frame.args[1]) ~= 'table' and frame thenor
frame.args[1] =and frame.args or
args = frame:getParent().args
if args[1] == '' then
args[1] = frame:getParent().args[1]
end
else
args = frame:getParent().args
end
else
args = frame
end
return MultiReplace(args)
end