Module:Taxonbar/exists/sandbox
Appearance
local p = {}
function p.check( frame )
local pagename = mw.title.getCurrentTitle().baseText
local content = mw.title.new(pagename):getContent() or ''
--sandbox only: do not include this if-statement in the live module
if string.match(pagename, 'sandbox') or
string.match(pagename, 'testcases') then
content = mw.title.new(pagename, 'Template'):getContent() or ''
end
--
local getRegex = require('Module:Template redirect regex').main
local tregex = getRegex('Taxonbar')
for _, v in pairs (tregex) do
local found = string.match(content, v)
if found then return true end
end
return false
end
return p