Module:siwa-noun/data: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 15: Line 15:
local function exactly(source, pattern)
local function exactly(source, pattern)
return source:match("^" .. pattern .. "$")
return source:match("^" .. pattern .. "$")
end
local function same(foo, bar)
foo, bar = mw.ustring.toNFD(foo), mw.ustring.toNFD(bar) -- decompose diacritics
foo, bar = match(foo, "^."), match(bar, "^.") -- sort out the letter
return foo == bar and true or false
end
end


Line 813: Line 807:
end
end
for double, long in ipairs(dtl) do
for double, long in pairs(dtl) do
data.forms["m"][1] = gsub(data.forms["m"][1], double, long)
data.forms["m"][1] = gsub(data.forms["m"][1], double, long)
end
end

Navigation menu