Module:pollasena-roots: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 49: Line 49:


for j = 2, #run - 1, 2 do
for j = 2, #run - 1, 2 do
if run[j + 1] ~= "" then
parse_err("Extraneous text '" .. run[j + 1] .. "' after modifier")
end
local modtext = run[j]:match("^<(.*)>$")
local modtext = run[j]:match("^<(.*)>$")
local prefix, arg = modtext:match("^([a-z]+):(.*)$")
local prefix, arg = modtext:match("^([a-z]+):(.*)$")
alt = prefix == "a" and arg or nil
alt = prefix == "a" and table.insert(links, link(term, alt)) or nil
cat = prefix == "c" and arg or nil
cat = prefix == "c" and table.insert(categories, "Soc'ul' terms from Wascotl *" .. (cat or term)) or nil
table.insert(links, link(term, alt))
table.insert(categories, "Soc'ul' terms from Wascotl *" .. (cat or term))
end
end
else
table.insert(links, link(term))
table.insert(categories, "Soc'ul' terms from Wascotl *" .. term)
end
end
end
end