Content deleted Content added
Tom.Reding (talk | contribs) m Include ']' in special_chars{} to prevent unmatched close-bracket error (Talk:1993 in Lithuanian football) |
No edit summary |
||
Line 57:
end
local importance_mask = function(raw_importance, class, scale, banner_name)▼
---------------------------
-- Importance mask --------
---------------------------
▲local importance_mask = function(raw_importance, class, scale, banner_name)
▲ local importance
▲ if scale=='inline' then -- pass importance without change
▲ importance = raw_importance
▲ elseif scale=='subpage' then
▲ local custom_mask = banner_name:subPageTitle('importance')
▲ if custom_mask.exists and #custom_mask:getContent()>1 then -- pass to custom importance mask
▲ importance = mw.text.trim(frame:expandTemplate{
▲ title = custom_mask.prefixedText,
▲ args = {importance=raw_importance or '¬', class=class}
▲ })
end▼
else▼
importance = frame:expandTemplate{▼
end
elseif raw_importance then-- standard importance scale
local mask = {top = 'Top', high = 'High', mid = 'Mid', low = 'Low', na = 'NA', no = 'NA'}
importance = nil▼
if mask[raw_importance:lower()] then
importance = mask[raw_importance:lower()]
▲ else
end
end
Line 103:
local ns = title.namespace
class = class:match('^%s*(.-)%s*$'):lower()
if pagetype=='redirect' or pagetype=='soft redirect' then
out = resolveFQSgrade('redirect')
|