Module:NUMBEROFSECTIONS: Difference between revisions

Content deleted Content added
if !nil
check for nil vals
Line 39:
end
-- Otherwise, add the page name to our table
else
elseif value then
pages[#pages + 1] = value
end
Line 48:
-- get the raw markup
haystack = mw.title.new(page)
if haystack then
-- count the sections and add to the total
total = total + count(haystack:getContent(), needles)
end
index = index + 1
page = pages[index]