Module:qhv-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 40: Line 40:
local syllables = split(term, "·")
local syllables = split(term, "·")
for i, syllable in ipairs(syllables) do
for i, syllable in ipairs(syllables) do
if match(syllable, "[àèìòùỳáéíóúý]") then
if match(syllable, "[áéíóúý]") then
syllable = gsub(syllable, "([áéíóúý])", mw.ustring.toNFD("%1"))
table.insert(syllables, i, "ˈ")
table.insert(syllables, i, "ˈ")
return table.concat(syllables)
return table.concat(syllables)