Module:Item: Difference between revisions

mNo edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 20: Line 20:
     local formattedNames = {}
     local formattedNames = {}


     for itemName in string.gmatch(itemNames, "[^%s&]+") do
     for itemName in string.gmatch(itemNames, "[^%s,/&]+") do
         local _, _, mod, name = string.find(itemName, "([^:]+):([^:]+)")
         local _, _, mod, name = string.find(itemName, "([^:]+):([^:]+)")
         if not mod then
         if not mod then
Line 29: Line 29:
         end
         end


if fileModule.fileExists("File:"..name..".png") then
if fileModule.fileExists("File:"..string.lower(name)..".png") then
name = "[[File:"..name..".png|20px]] "..capitalizeFirstLetter(name)
name = "[[File:"..string.lower(name)..".png|20px]] "..capitalizeFirstLetter(name)
end
end