Module:pollasena-roots: Difference between revisions

No edit summary
No edit summary
Line 130: Line 130:
table.insert(terms, item)
table.insert(terms, item)
local cat_term = args.c[root_index] or item.term
local function one_asterisk(str)
cat_term = "*" .. gsub(cat_term, "^*+", "") -- ensure only one asterisk
return "*" .. gsub(str, "^*+", "")
local user_provided_cat_term = cat_term
end
local cat_term = one_asterisk(args.c[root_index] or item.term)
if args.c[root_index] and one_asterisk(args.c[root_index]) == item.term then
require("Module:debug").track("redundant and obsolete c")
end
if code == "wasc" then -- Wascotl root and suffix handling
if code == "wasc" then -- Wascotl root and suffix handling
Line 141: Line 146:
end
end
if args.c[root_index] and user_provided_cat_term == cat_term then
if args.c[root_index] and one_asterisk(args.c[root_index]) == cat_term then
require("Module:debug").track("redundant and obsolete c")
require("Module:debug").track("redundant and obsolete c")
end
end