Module:Category handler/shared: திருத்தங்களுக்கு இடையிலான வேறுபாடு
Jump to navigation
Jump to search
உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
allow specifying a custom blacklist |
make this output either true or false, and switch indentation to tabs |
||
| வரிசை 3: | வரிசை 3: | ||
local function matchesBlacklist(page, blacklist) |
local function matchesBlacklist(page, blacklist) |
||
| ⚫ | |||
if type(page) ~= 'string' then |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
return false |
|||
end |
|||
| ⚫ | |||
end |
end |
||
13:13, 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)
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
}