local getArgs = require('Module:Arguments').getArgs
local p = {}
function p.main(frame)
local args = getArgs(frame)
return p._main(frame, args)
end
function p._main(frame, args)
if not frame then
frame = mw.getCurrentFrame()
end
local sep = args['sep'] or '、'
local maps = mw.text.split(frame:expandTemplate{ title = args['page'] or '无畏契约地图池/maps', args = {''} }, '、', true)
local outs = mw.text.split(args['out'] or '', '、', true)
local ins = {}
for _, map in ipairs(maps) do
local outFlag = false
for _, out in ipairs(outs) do
if map == out then
outFlag = true
break
end
end
if not outFlag then
table.insert(ins, map)
end
end
return '[[' .. table.concat(ins, ']]' .. sep .. '[[') .. ']]'
end
return p