7,878
edits
No edit summary |
No edit summary |
||
(28 intermediate revisions by the same user not shown) | |||
Line 39: | Line 39: | ||
-- end | -- end | ||
-- Edited to turn regular links into | -- Edited to turn regular links into links with ' (Vanilla)' at the end and to turn parallel: prefixes into regular links | ||
local link = ( args.link or '' ) | local link = ( args.link or '' ) | ||
if mw.ustring.lower( link ) == 'none' then | if mw.ustring.lower( link ) == 'none' then | ||
Line 110: | Line 110: | ||
spriteText = '[' .. link .. ' ' .. tostring( spriteText ) .. ']' | spriteText = '[' .. link .. ' ' .. tostring( spriteText ) .. ']' | ||
else | else | ||
if string.find(link, " | if string.find(link, " (Vanilla)") then -- <-- this inner if/else statement is added | ||
spriteText = '[[' .. link .. '|' .. tostring( spriteText ):gsub(" (Vanilla)", "") .. ']]' | |||
spriteText = '[[' .. | elseif string.find(tostring(spriteText), "[Pp]arallel:") then | ||
text = tostring(spriteText):gsub(":%l", string.upper) | |||
text = text:gsub("[Pp]arallel:", "") | |||
spriteText = '[[' .. link .. '|' .. text .. ']]' | |||
else | else | ||
spriteText = '[[' .. link | spriteText = '[[' .. link .. '|' .. tostring( spriteText ) .. ']]' | ||
end | end | ||
end | end | ||
end | end |