Jump to content

Module:Team bracket tracking

Permanently protected module
From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by MusikAnimal (talk | contribs) at 17:19, 10 October 2017 (Protected "Module:Team bracket tracking": High-risk module ([Edit=Require template editor access] (indefinite))). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
local p = {}

function p.tracking(frame)
	local args = frame:getParent().args
	for k, v in pairs(args) do
		if tostring(k):match('%-team[0-9]') then
			if tostring(v):match('[Bb][Rr][^<>]*>[%s]*.[Nn][Bb][Ss][Pp]') then
				return '[[Category:Pages using a team bracket with nbsp]]'
			end
			if tostring(v):match('[Bb][Rr][^<>]*>[%s]*<span[^<>]*>[%s]*.[Nn][Bb][Ss][Pp]') then
				return '[[Category:Pages using a team bracket with nbsp]]'
			end
		end
	end
	return ''
end

return p