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 blacklist = require('Module:Category handler/blacklist')
local function matchesBlacklist(page, blacklist)
if type(page) ~= 'string' then

return nil
local function matchesBlacklist(page)
end
if type(page) ~= 'string' then return 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
}
"https://tamilar.wiki/w/index.php?title=Module:Category_handler/shared&oldid=82713" இலிருந்து மீள்விக்கப்பட்டது