10,794
edits
TheNightAvl (talk | contribs) mNo edit summary |
TheNightAvl (talk | contribs) mNo edit summary |
||
Line 116: | Line 116: | ||
-- BEGIN BASE GENERATION -- | -- BEGIN BASE GENERATION -- | ||
function export.generate_IPA(s) | function export.generate_IPA(s) | ||
local s_len = | local s_len = s:len() | ||
IPA = {} | IPA = {} | ||
local split_s = {} | local split_s = {} | ||
for i = 1, s_len do | for i = 1, s_len do | ||
split_s[i] = mw.ustring. | split_s[i] = mw.ustring.gsub(s, i,i) | ||
end | end | ||
if s_len == 0 then | if s_len == 0 then | ||
Line 185: | Line 185: | ||
if type(getData) == "string" and (i == 0 or multiMatch == true) then | if type(getData) == "string" and (i == 0 or multiMatch == true) then | ||
append_IPA(getData) | append_IPA(getData) | ||
s = mw.ustring. | s = mw.ustring.gsub(s, 1, s_len + i - 1) | ||
s_len = | s_len = s:len(s) | ||
break | break | ||
elseif deadEnd == false then | elseif deadEnd == false then |