Module:NUMBEROFSECTIONS: Difference between revisions

Content deleted Content added
fixed test for non existent pages - this is how was was supposed to be working all along
Line 20:
local haystack = ''
-- Separate page names from # delimited string into table
local pagestitles = mw.text.split(frame.args[1], '%s?#%s?')
titles = titles:gsub("'", "'") -- workaround astonishing bug: {{FULLPAGENAME}} gives "'" for apostrophe!
local pages = mw.text.split(titles, '%s?#%s?')
-- Separate whitespace delimited section level numbers into table
local levels = mw.text.split(frame.args['level'], '%s*')