45,660
edits
No edit summary |
No edit summary |
||
Line 41: | Line 41: | ||
end | end | ||
function export.coalescence(word, stress) | function export.coalescence(word, stress, t) | ||
local diphthongs = { | local diphthongs = { | ||
["[aę]▫[aę]"] = "ả", ["e▫e"] = "ẻ", ["i▫i"] = "ỉ", ["u▫[yuů]"] = "ủ", ["[yů]▫u"] = "ủ", | ["[aę]▫[aę]"] = "ả", ["e▫e"] = "ẻ", ["i▫i"] = "ỉ", ["u▫[yuů]"] = "ủ", ["[yů]▫u"] = "ủ", | ||
Line 85: | Line 85: | ||
local c3 = "" | local c3 = "" | ||
for regex, repl in pairs(triphthongs) do | if t then | ||
for regex, repl in pairs(triphthongs) do | |||
c3 = gsub(word, regex, repl) | |||
if word ~= c3 then return c3 end | |||
end | |||
end | end | ||