Module:qay-pron: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 67: Line 67:


local function syllabify(term)
local function syllabify(term)
local words = mw.text.split(term,"%s")
local final = {}
local final = {}
for _, word in ipairs(words) do
for word in gsplit(term,"%s") do
word = gsub(word, "(" .. consonants .. "*)(" .. vowels .. "*)", "%1%2·")
word = gsub(word, "(" .. consonants .. "*)(" .. vowels .. "*)", "%1%2·")
word = gsub(word, "··", "·"); word = gsub(word, "·$", ""); word = gsub(word, "^·", "")
word = gsub(word, "··", "·"); word = gsub(word, "·$", ""); word = gsub(word, "^·", "")

Navigation menu