Module:Category handler/shared: திருத்தங்களுக்கு இடையிலான வேறுபாடு
Jump to navigation
Jump to search
உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
move blacklist-matching function from Module:Category handler |
allow specifying a custom blacklist |
||
| வரிசை 2: | வரிசை 2: | ||
-- and its submodules. |
-- and its submodules. |
||
local |
local function matchesBlacklist(page, blacklist) |
||
| ⚫ | |||
return nil |
|||
local function matchesBlacklist(page) |
|||
end |
|||
| ⚫ | |||
for i, pattern in ipairs(blacklist) do |
for i, pattern in ipairs(blacklist) do |
||
local match = mw.ustring.match(page, pattern) |
local match = mw.ustring.match(page, pattern) |
||
01:51, 7 சூலை 2014 இல் நிலவும் திருத்தம்
Documentation for this module may be created at Module:Category handler/shared/doc
-- This module contains shared functions used by [[Module:Category handler]]
-- and its submodules.
local function matchesBlacklist(page, blacklist)
if type(page) ~= 'string' then
return nil
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
}