Module:WikiLink

require('Module:StrSplit')

local p = {}

function p.wikilink(strArg) 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 res = "" for i,ind in ipairs(table) do       local indSub = ind:gsub("&#8203;", ""):gsub("&shy;", ""):gsub("­",""):gsub("",""):gsub("",""):gsub(" -%(.*%) -","") local wikiString = " ".. ind .." " mw.logObject(wikiString) if (i > 1) then res = res .. ", "       end res = res .. wikiString end mw.logObject(res) return res end

return p