45,647
edits
mNo edit summary |
No edit summary |
||
Line 43: | Line 43: | ||
local syllables = split(term, "·") | local syllables = split(term, "·") | ||
if #syllables == 1 then return table.concat(syllables) end -- account for monosyllables | |||
for i, syllable in ipairs(syllables) do | for i, syllable in ipairs(syllables) do | ||
if match(syllable, "[áéíóúý]") then | if match(syllable, "[áéíóúý]") then -- if the user inputted manual stress, ignore all the rest | ||
table.insert(syllables, i, "ˈ") | table.insert(syllables, i, "ˈ") | ||
return table.concat(syllables) | return table.concat(syllables) |