45,660
edits
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 | ||
lenited = mw.ustring.gsub(word, regex, repl, 1) | |||
if lenited ~= word then return lenited end | |||
end | end | ||
end | end | ||