Module:headword: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 576: Line 576:
if data.affix then
if data.affix then
if mw.ustring.match(data.affix, "^%-[^-]*%-$") then
for _, aff in ipairs(data.affix) do
table.insert(data.categories, data.lang:getCanonicalName() .. " words infixed with " .. data.affix)
if mw.ustring.match(aff, "^%-[^-]*%-$") then
elseif mw.ustring.match(data.affix, "%-%s%-") then
table.insert(data.categories, data.lang:getCanonicalName() .. " words infixed with " .. aff)
table.insert(data.categories, data.lang:getCanonicalName() .. " words circumfixed with " .. data.affix)
elseif mw.ustring.match(aff, "%-%s%-") then
elseif mw.ustring.match(data.affix, "%-$") then
table.insert(data.categories, data.lang:getCanonicalName() .. " words circumfixed with " .. aff)
table.insert(data.categories, data.lang:getCanonicalName() .. " words prefixed with " .. data.affix)
elseif mw.ustring.match(aff, "%-$") then
elseif mw.ustring.match(data.affix, "^%-") then
table.insert(data.categories, data.lang:getCanonicalName() .. " words prefixed with " .. aff)
table.insert(data.categories, data.lang:getCanonicalName() .. " words suffixed with " .. data.affix)
elseif mw.ustring.match(aff, "^%-") then
table.insert(data.categories, data.lang:getCanonicalName() .. " words suffixed with " .. aff)
end
end
end
end
end

Navigation menu