Différences entre les versions de « Module:Icon »

Aller à la navigation Aller à la recherche
Aucun changement de taille ,  23 octobre 2021 à 16:14
aucun résumé de modification
Ligne 5 : Ligne 5 :


local function trim(object)
local function trim(object)
if string.sub(object, 1, 2) == ' ' then  
if string.sub(object, 1, 1) == ' ' then  
object = string.sub(object, 2)
object = string.sub(object, 2)
end
end
if string.sub(object, string.len(object)-1) == ' ' then
if string.sub(object, string.len(object)) == ' ' then
object = string.sub(object, 1, string.len(object) - 1)
object = string.sub(object, 1, string.len(object) - 1)
end
end
Ligne 17 : Ligne 17 :


local function _requirements(resource, value, link, text)
local function _requirements(resource, value, link, text)
resource = trim(object)
resource = trim(resource)
if iconList[string.lower(resource)] ~= nil then
if iconList[string.lower(resource)] ~= nil then
result = '[[file:' .. iconList[resource]['file'] .. '|16px|link='
result = '[[file:' .. iconList[resource]['file'] .. '|16px|link='
1 124

modifications

Menu de navigation