local getArgs = require('Modulo:Arguments').getArgs

local p = {}

function p.split(frame)
local pages = {}
local args = getArgs(frame)
local Target = frame.args[1]
local SplitOf = args.splitof or frame.args[2] or ''

SplitIn = args.splitin or frame.args[3] or ', '
local SplitIn = mw.ustring.gsub(SplitIn, '_', ' ')
local Prefix = args.prefix or ''
local PrefixInLink = args.prefixInLink or ''

for i, j in pairs(mw.text.split(Target, SplitOf)) do
	table.insert(pages, string.format('[['..Prefix..'%s|'..PrefixInLink..''..mw.text.trim(j)..']]', mw.text.trim(j)))
end

return table.concat(pages, SplitIn..' ')
end
return p