Jump to content

Module:Category handler/shared

Permanently protected module
Frae Wikipedia, the free beuk o knawledge
Reveesion aes o 23:46, 6 Julie 2014 bi Mr. Stradivarius (Collogue | contribs) (move blacklist-matching function from Module:Category handler)
(diff) ← Aulder reveision | see current reveision (diff) | Newer reveision → (diff)
-- This module contains shared functions used by [[Module:Category handler]]
-- and its submodules.

local blacklist = require('Module:Category handler/blacklist')

local function matchesBlacklist(page)
    if type(page) ~= 'string' then return end
    for i, pattern in ipairs(blacklist) do
        local match = mw.ustring.match(page, pattern)
        if match then
            return match
        end
    end
end

return {
	matchesBlacklist = matchesBlacklist
}