Module:Vital article: Difference between revisions

Content deleted Content added
return level
fix bug when page is a number
Line 15:
end
local data_page = 'Wikipedia:Vital articles/data/' .. subpage .. '.json'
local page2 = tonumber(page) or page --convert to number if page is numerical, otherwise loadJsonData does not work
local data = mw.loadJsonData(data_page)[pagepage2]
if data then
local level = tostring(data.level)
Line 31 ⟶ 32:
link = link .. '/' .. data.sublist
end
--if data.section then -- not used until we have stable section anchors to link to
-- link = link .. '#' .. data.section
--end
end
return link, level