Tu banner alternativo

Module:AfC submission catcheck/sandbox

Today, Module:AfC submission catcheck/sandbox is a topic that has captured the attention of people of all ages and backgrounds. Since its emergence, Module:AfC submission catcheck/sandbox has generated increasing interest and has become a central element in the discussion of various aspects of daily life. Whether in the workplace, in education, in politics or in entertainment, Module:AfC submission catcheck/sandbox has proven to be a relevant and current topic that deserves to be analyzed in depth. In this article, we will explore different perspectives on Module:AfC submission catcheck/sandbox and examine its impact on today's society.

Tu banner alternativo
local p = {}

local function removeFalsePositives(str)
	if not str then
		return ''
	end
	str = mw.ustring.gsub(str, "<!--.--->", "")
	str = mw.ustring.gsub(str, "<nowiki>.-</nowiki>", "")
	str = mw.ustring.gsub(str, "{{raft ategories-{{-}}-}}", "")
	str = mw.ustring.gsub(str, "{{raft ategories.-}}", "")
	str = mw.ustring.gsub(str, "{{raftcat-{{-}}-}}", "")
	str = mw.ustring.gsub(str, "{{raftcat.-}}", "")
	str = mw.ustring.gsub(str,"%%]","")
	str = mw.ustring.gsub(str,"%rafts?.-%]%]","")
	str = mw.ustring.gsub(str,"%%]","")
	return str
end

function p.checkforcats(frame)
    local t = mw.title.getCurrentTitle()
    tc = t:getContent()
    if tc == nil then 
        return ""
    end
    tc = removeFalsePositives(tc)
    if mw.ustring.match(tc, "%ategory:" ) == nil then
        return ""
    else
        return "]"
    end
end

function p.submitted(frame)
	local text = removeFalsePositives(mw.title.getCurrentTitle():getContent())
	if mw.ustring.find(text, '{{AfC submission||', 1, true) or mw.ustring.find(text, '{{AFC submission||', 1, true) then
		return frame.args
	else
		return frame.args
	end
end

return p