Module:siwa-pron: Difference between revisions
No edit summary |
No edit summary |
||
| Line 26: | Line 26: | ||
} | } | ||
local tab = mw.text.split(v,"") | local tab = mw.text.split(v,"") | ||
for | for regex, replacement in ipairs(switch) do | ||
for | local index | ||
gsub(tab[ | if tab[3]~=nil then | ||
index=3 | |||
else index=3 | |||
end | |||
for i=1,index do | |||
gsub(tab[i], regex, replacement) | |||
end | end | ||
end | end | ||
return table.concat(tab) | return table.concat(tab) | ||
end | end | ||