Module:SpriteFile: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 110: Line 110:
spriteText = '[' .. link .. ' ' .. tostring( spriteText ) .. ']'
spriteText = '[' .. link .. ' ' .. tostring( spriteText ) .. ']'
else
else
if string.find(link, "(Vanilla)") then -- <-- this inner if/else statement is added
if string.find(link, " (Vanilla)") then -- <-- this inner if/else statement is added
spriteText = '[[' .. link .. '|' .. tostring( spriteText ):gsub(" (Vanilla)", "") .. ']]'
spriteText = '[[' .. link .. '|' .. tostring( spriteText ):gsub(" (Vanilla)", "") .. ']]'
elseif string.find(tostring(spriteText), "[Pp]arallel:") then
elseif string.find(tostring(spriteText), "[Pp]arallel:") then
spriteText = '[[' .. link .. '|' .. tostring( spriteText ):gsub("[Pp]arallel:", ""):gsub("%a", string.upper, 1) .. ']]'
spriteText = '[[' .. link .. '|' .. tostring( spriteText ):gsub("[Pp]arallel:", string.upper) .. ']]'
else
else
spriteText = '[[' .. link .. '|' .. tostring( spriteText ) .. ']]'
spriteText = '[[' .. link .. '|' .. tostring( spriteText ) .. ']]'

Navigation menu