Module:siwa-noun/common: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 28: Line 28:
}
}
for regex, repl in pairs(lenition_patterns) do
for regex, repl in pairs(lenition_patterns) do
lenited = word:gsub(regex, repl, 1)
lenited = gsub(word, regex, repl, 1)
if lenited ~= word then return lenited end
if lenited ~= word then return lenited end
end
end
Line 49: Line 49:
for regex, repl in pairs(diphthongs) do
for regex, repl in pairs(diphthongs) do
word = word:gsub(regex, repl, 1)
word = gsub(word, regex, repl, 1)
end
end
if stress then
if stress then
word = word:gsub("[ůy]▫.", "ỷ")
word = gsub(word, "[ůy]▫.", "ỷ")
end
end
word = word:gsub("▫", "")
word = gsub(word, "▫", "")
return word
return word