Module:pollasena-roots: Difference between revisions

No edit summary
No edit summary
Line 149: Line 149:
list = true,
list = true,
allow_holes = true,
allow_holes = true,
default = lang_options.default,
}
params["c"] = {
list = true,
allow_holes = true,
}
}
else
else
params[termarg_index] = {
params[termarg_index] = {
required = not lang_options.optional,
required = not lang_options.optional,
default = lang_options.default,
}
}
end
end
Line 202: Line 204:
item.alt = item.alt:gsub("^%*", "")
item.alt = item.alt:gsub("^%*", "")
end
end
item.no_alt_ast = true
end
end
table.insert(terms, item)
table.insert(terms, item)
local cat_term = "*" .. gsub(item.term, "^*+", "") -- ensure only one asterisk
local cat_term = args.c[root_index] or item.term
if code == "wasc" then -- Wascotl root and suffix handling
cat_term = "*" .. gsub(cat_term, "^*+", "") -- ensure only one asterisk
if code == "wasc" and cat_term ~= item.term then -- Wascotl root and suffix handling
local suffix = match(cat_term, "^*%w+%-(%w+)$")
local suffix = match(cat_term, "^*%w+%-(%w+)$")