Module:AutoGene

local Gene = {} local typeData = mw.loadData ( 'Module:AutoGene/Types' ) function Gene.type(frame) local text = frame.args[1] or frame.args["gene"] text = string.gsub(text, "\n", "") local categories = "" local split = mw.text.split(text, '%*') table.remove(split, 1) if split[1] == nil then split[1] = text end for i, j in ipairs(split) do       local ogene = string.lower(j) ogene = string.gsub(ogene, "%[", "") ogene = string.gsub(ogene, "%]", "") ogene = string.gsub(ogene, "%*", "") ogene = string.gsub(ogene, "%:", "") ogene = string.gsub(ogene, "%", "") ogene = string.gsub(ogene, "%|", "") ogene = string.gsub(ogene, "wcgundam", "") stringOne = string.sub(ogene, 1, string.len(ogene)/2) stringTwo = string.sub(ogene, string.len(ogene)/2+1, string.len(ogene)) if (stringOne == stringTwo) then ogene = stringOne end ogene2 = typeData[ogene] or "" ogene3 = "" if not (ouniverse3 == "[[Category:]]") then categories = categories..ogene3 end end return categories end return Gene --