Module:pollasena-roots: Difference between revisions

No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 207: Line 207:
separator = item.term
separator = item.term
elseif item.term then
elseif item.term then
if root_index > 1 and match(items[root_index - 1].term, "%-$") then -- no asterisk after hyphen
if root_index > 1 and separator ~= "+" and match(items[root_index - 1].term, "%-$") then -- no asterisk after hyphen
if not item.alt then
if not item.alt then
item.alt = item.term:gsub("^%*", "")
item.alt = item.term:gsub("^%*", "")
Line 267: Line 267:
local referrals = {}
local referrals = {}
for _, part in ipairs(args.parts) do
for _, part in ipairs(args.parts) do
local referral = m_links.full_link {
local referral = m_links.full_link({
lang = ancestor_lang,
lang = ancestor_lang,
term = part,
term = part,
}
}, "term")
table.insert(referrals, referral)
table.insert(referrals, referral)