Module:SpriteFile: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 108: Line 108:
-- have to do this weird inner tostring here bc something about converting the spriteText table causes the text indentation to be correct
-- have to do this weird inner tostring here bc something about converting the spriteText table causes the text indentation to be correct
-- linkName = (linkName:gsub("^%l", string.upper))
-- linkName = (linkName:gsub("^%l", string.upper))
spriteText = '[[' .. mw.ustring.gsub( tostring(spriteText), "[Pp]arallel:", "" ) .. '|' .. mw.ustring.gsub( tostring(spriteText), "[Pp]arallel:", "" ) .. ']]'  
spriteText = '[[' .. mw.ustring.gsub( link, "parallel:", "" ):gsub("^%l", string.upper) .. '|' .. mw.ustring.gsub( tostring(spriteText), "parallel:", "" ):gsub("^%l", string.upper) .. ']]'  
else
else
spriteText = '[[' .. link .. ' (Vanilla)' .. '|' .. tostring( spriteText ) .. ']]'
spriteText = '[[' .. link .. ' (Vanilla)' .. '|' .. tostring( spriteText ) .. ']]'