Modul:Category handler/shared: Unterschied zwischen den Versionen
(allow specifying a custom blacklist) |
(make this output either true or false, and switch indentation to tabs) |
||
| Zeile 3: | Zeile 3: | ||
local function matchesBlacklist(page, blacklist) | local function matchesBlacklist(page, blacklist) | ||
for i, pattern in ipairs(blacklist) do | |||
local match = mw.ustring.match(page, pattern) | |||
if match then | |||
return true | |||
end | |||
end | |||
return false | |||
end | end | ||
Version vom 7. Juli 2014, 14:13 Uhr
Die Dokumentation für dieses Modul kann unter Modul:Category handler/shared/doc erstellt werden
-- This module contains shared functions used by [[Module:Category handler]]
-- and its submodules.
local function matchesBlacklist(page, blacklist)
for i, pattern in ipairs(blacklist) do
local match = mw.ustring.match(page, pattern)
if match then
return true
end
end
return false
end
return {
matchesBlacklist = matchesBlacklist
}