Module:Ns has subpages: Difference between revisions

Content deleted Content added
make replacement for Template:Ns has subpages
 
m Changed protection settings for "Module:Ns has subpages": Per template ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
 
(3 intermediate revisions by one other user not shown)
Line 20:
-- thing as {{NAMESPACE}} in most cases.
if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then
local nsStripped = ns:gsub('^[_%s]*:+', '')
nsStripped = nsStripped:gsub(':.*$', '')
nsTable = mw.site.namespaces[nsStripped]