45,660
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
local gsub = mw.ustring.gsub | local gsub = mw.ustring.gsub | ||
local export = {} | local export = {} | ||
Line 8: | Line 6: | ||
--local word = frame:getParent().args[1] -- for testing | --local word = frame:getParent().args[1] -- for testing | ||
local lenited = "" | local lenited = "" | ||
local v = "([ | local v = "([aeiouyůõảẻỉỏủỷę·])" | ||
local lenition_patterns = { | local lenition_patterns = { | ||
--geminated voiced stops | --geminated voiced stops | ||
Line 31: | Line 29: | ||
for regex, repl in pairs(lenition_patterns) do | for regex, repl in pairs(lenition_patterns) do | ||
if word:match(" | if word:match("·.*·") then | ||
lenited = gsub(word, " | lenited = gsub(word, "·" .. regex .. "·", repl, 1) | ||
else | else | ||
lenited = gsub(word, regex, repl, 1) | lenited = gsub(word, regex, repl, 1) |