8,278
edits
No edit summary |
No edit summary |
||
Line 22: | Line 22: | ||
local id = mw.text.trim( tostring( args[1] or '' ) ) | local id = mw.text.trim( tostring( args[1] or '' ) ) | ||
local idPrefix = "" | |||
if not args.keepcase then | if not args.keepcase then | ||
id = mw.ustring.lower( id ):gsub( '[%s%+]', '-' ) | id = mw.ustring.lower( id ):gsub( '[%s%+]', '-' ) | ||
if string.find(id, "parallel:") then | if string.find(id, "parallel:") then | ||
id = mw.ustring.lower( id ):gsub( 'parallel:', '' ) | id = mw.ustring.lower( id ):gsub( 'parallel:', '' ) | ||
idPrefix = "Parallel" | |||
end | end | ||
end | end | ||
Line 68: | Line 70: | ||
name = 'Invicon' | name = 'Invicon' | ||
end | end | ||
local file = name .. ' ' .. id .. '.png' | -- local file = name .. ' ' .. id .. '.png' | ||
local file = idPrefix .. name .. ' ' .. id .. '.png' | |||
local altText = file .. ': Sprite image for ' .. id .. ' in Minecraft' | local altText = file .. ': Sprite image for ' .. id .. ' in Minecraft' | ||
if link ~= '' then | if link ~= '' then |