From Wikipedia, the free encyclopedia
Usage
{{#invoke:Multiple issues|type|1=issue templates|}}
Implements the type selection function of {{Multiple issues}}. Returns a value for the |type= field of {{Mbox}} based on the most severe issue type template passed as parameter 1.
local p = {}
function p.type(frame)
local html = frame:preprocess(frame.args[1] or "")
for _, class in ipairs{"speedy", "delete", "protection", "move", "content", "style", "notice",} do
if html:find("mbox-"..class, 1, true) then
return class
end
end
return "content"
end
return p