Module:Medium

require('Module:StrSplit')

local p = {} function trim(s) return (s:gsub("^%s*(.-)%s*$", "%1")) end

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

--local str = "game, doujin" --local str = "Hy&shy;per­di&#8203;mensio&shy;n Nept&shy;unia"

--if (strArg ~= nil) then --   str = strArg --end mw.logObject(str) local table = strSplit(str,",\n") mw.logObject(table)

local res = "" for i,ind in ipairs(table) do       local indSub = trim(ind) local medium = " ".. indSub .." " mw.logObject("medium ".. medium) if (i > 1) then res = res .. ", "       end res = res .. medium end mw.logObject("res: "..res) return res end

return p