Module:Section link: Difference between revisions

more elegant fix for blank page names
(allow blank first parameters, as the template also does this)
(more elegant fix for blank page names)
Line 28:
options = options or {}
title = title or mw.title.getCurrentTitle()
 
-- Deal with blank page names elegantly
if not page:find('%S') then
page = nil
options.nopage = true
end
 
-- Make the link(s).