Module:siwa-noun/common: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 3: Line 3:
function export.lenition(frame)
function export.lenition(frame)
local word = frame:getParent().args[1]
local word = frame:getParent().args[1]
local lenited = ""
local v = "([aeiouyůõảẻỉỏủỷę])"
local v = "([aeiouyůõảẻỉỏủỷę])"
local lenition_patterns = {
local lenition_patterns = {
Line 12: Line 13:
}
}
for regex, repl in pairs(lenition_patterns) do
for regex, repl in pairs(lenition_patterns) do
word = mw.ustring.gsub(word, regex, repl, 1)
lenited = mw.ustring.gsub(word, regex, repl, 1)
if lenited ~= word then return lenited end
end
end
--word = mw.ustring.gsub(word, v.."[vųbhḥg]"..v, "%1%2")
return word
end
end