Module:Section link: Difference between revisions
more elegant fix for blank page names
m>Mr. Stradivarius (allow blank first parameters, as the template also does this) |
m>Mr. Stradivarius (more elegant fix for blank page names) |
||
Line 28: | Line 28: | ||
options = options or {} | options = options or {} | ||
title = title or mw.title.getCurrentTitle() | 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). | -- Make the link(s). |