Module:CommonReplacements

function commonReplacements(str) --local str = mw.getCurrentFrame.args[1] --local str = "Hyperdimension Neptunia[Hyperdimension Neptunia] {}" local linkList = {} wikiL = string.match(str,"%[.-%]") if (wikiL) then table.insert(linkList, wikiL) end customL = string.match(str,"%{.-%}") if (customL) then table.insert(linkList, customL) end str = str:gsub(" -%[.-%] -",""):gsub(" ?%{.-%} ?","")

str = str:gsub("Hyperdimension","Hyper&shy;dimension"):gsub("hyperdimension","hyper&shy;dimension") :gsub("Fate/","Fate/&#8203;") :gsub("(@)(%w)","%1&#8203;%2") :gsub("Resurrection","Res&shy;ur&shy;rec&shy;tion") :gsub("Kyuuketsuki","Kyuu&shy;ketsu&shy;ki") :gsub("Steins;Gate","Steins;&#8203;Gate") :gsub("Seitokaichou","Seito&shy;kaichou") :gsub("shimasu","&shy;shimasu") --            :gsub("","") for i in ipairs(linkList) do       str = str .. " " .. linkList[i] end mw.logObject(str) return str end