Module:kilta-headword: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 19: Line 19:
local function plural(word, n)
local function plural(word, n)
local w = split(word, "%s")
local w = split(word, "%s")
if n > tonumber(#w) then error("Word index outside bounds.") end
if 1 > tonumber(#w) then error("Word index outside bounds.") end
if w[n]:match("[kh]wa$") or w[n]:match("a$") then
if w[n]:match("[kh]wa$") or w[n]:match("a$") then