Module:Medium

require('Module:StrManip')

local p = {}

function p.main(strArg) local str = mw.getCurrentFrame.args[1]

--local str = "game (afdasdfe), doujin (brackets are fun)" mw.logObject(str) local table = strSplit(str,",\n") mw.logObject(table)

local res = "" for i,ind in ipairs(table) do       local indSub = trim(ind):gsub(" -%(.*%) -","") col = " " if (i > 1) then col = " " --today I learned that hex colours can have an alpha channel. res = res .. col .. ", "       end local medium = "".. col .. ind .." " mw.logObject("medium ".. medium) res = res .. medium end mw.logObject("res: "..res) return res end

return p