Module:WikiLink

require('Module:StrSplit')

local p = {}

function p.main local str = mw.getCurrentFrame.args[1] local str = "Voice Actor A, Voice Actor B (brackets), va c"   --local str = "Hy&shy;per­di&#8203;mensio&shy;n Nept&shy;unia" mw.logObject(str) local table = strSplit(str,",\n") mw.logObject(table)

local count = 0 local res = "" for i,ind in ipairs(table) do       count = count + 1 local indSub = ind:gsub("&#8203;", ""):gsub("&shy;", ""):gsub("­",""):gsub("",""):gsub("",""):gsub(" -%(.*%) -","") local wikiString = "" local wikiString = wikiString .. " ".. ind .." " mw.logObject(wikiString) if (i > 1) then res = res .. ", " .. wikiString else res = res .. wikiString end end mw.logObject(res) return new end

return p