Module:Str find word: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 310:
local function setSep(sSep)
-- comma-space? / does not matter
sSep = decodeUnicode(sSep or '')
local newSep
sSep = mw.ustring.gsub(sSep, '[%s%w%d]', '')
if sSep == nil or sSep == '' then return defaultSep end
sSep = decodeUnicode(sSepnewSep or '')
sSep = mw.ustring.gsub(sSepnewSep, '[%s%w%d]', '')
----newSep = mw.ustring.gsub(newSep, '[%s%w%d]', '')
if string.match(sSep, '[%s%w%d]') ~= nil then -- not ok ok
return defaultSep
end
if sSepnewSep == nil or sSepnewSep == '' then return defaultSep end
if newSep ~= sSep then return defaultSep end
return sSep
end