Module:pollasena-roots: Difference between revisions

No edit summary
No edit summary
Line 121: Line 121:
separator = item.term
separator = item.term
elseif item.term then
elseif item.term then
if root_index > 1 and match(last_term, "%-$") then -- no asterisk after hyphen
if root_index > 1 and last_term ~= "+" then -- only subsequent asterisks afer space
if not item.alt then
item.alt = gsub(item.alt or item.term, "^%*", "")
item.alt = item.term:gsub("^%*", "")
else
item.alt = item.alt:gsub("^%*", "")
end
end
end
table.insert(terms, item)
table.insert(terms, item)
local function one_asterisk(str)
return "*" .. gsub(str, "^*+", "")
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 144: Line 131:
if wasc_suffixes[suffix] then
if wasc_suffixes[suffix] then
cat_term = gsub(cat_term, suffix, "-")
cat_term = gsub(cat_term, suffix, "-")
end
if args.c[root_index] and one_asterisk(args.c[root_index]) == cat_term then
require("Module:debug").track("redundant and obsolete c")
end
end
end
end