Module:Vital article: Difference between revisions

Content deleted Content added
try to work with unassessed
No edit summary
Line 48:
local cat = frame.args.category~='' and frame.args.category or mw.title.getCurrentTitle().subjectPageTitle.text
local class, topic = cat:match('^([%a-]+) vital articles in ([%a ]+)$')
class = class:match('(%a+)-Class') or 'Unassessed'
if class and topic then
class = class:match('(%a+)-Class') or 'Unassessed'
return top(false, frame)
.. '[[Category:Wikipedia vital articles in ' .. topic .. ' by class|' .. class .. ']]'
Line 61:
end
class = cat:match('^([%a-]+) vital articles by topic$')
class = class:match('(%a+)-Class') or 'Unassessed'
if class then
class = class:match('(%a+)-Class') or 'Unassessed'
return top(true, frame)
.. '[[Category:' .. class .. (class=='Unassessed' and '' or '-Class') .. '-Class vital articles|Topic]]'