Module:Category handler/shared
Appearance
| This module is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing. |
| This module is currently protected from editing. See the protection policy and protection log for more details. Please discuss any changes on the talk page; you may submit an edit request to ask an administrator to make an edit if it is uncontroversial or supported by consensus. You may also request that this page be unprotected. |
| This module can only be edited by administrators because it is transcluded onto one or more cascade-protected pages. |
| This Lua module is used in system messages, and on approximately 4,870,000 pages, or roughly 8% of all pages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
| This module depends on the following other modules: |
Usage
{{#invoke:Category handler|function_name}}
-- 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
}