Module:Vital article: Difference between revisions

Content deleted Content added
fix bug when page is a number
simplify code and use section when available
Line 20:
local level = tostring(data.level)
if level then
local link = 'Wikipedia:Vital articles/Level/' .. trimmed_linklevel
local trimmed_link = data.trimmed_link
if (level=='4' or level=='5') and data.topic then
local link
link = link .. '/' .. data.topic
if trimmed_link then
end
link = 'Wikipedia:Vital articles' .. trimmed_link
if trimmed_linkdata.sublist then
else
link = 'Wikipedia:Vitallink articles/Level.. '/' .. leveldata.sublist
end
if (level=='4' or level=='5') and data.topic then
if data.sublistsection then
link = link .. '/' .. data.topic
link = link .. '/#' .. data.sublistsection
end
if data.sublist then
link = link .. '/' .. data.sublist
end
end
return link, level