1 124
modifications
| Ligne 5 : | Ligne 5 : | ||
local function trim(object) | local function trim(object) | ||
if string.sub(object, 1, | 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) | 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( | 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=' | ||