Module:SpriteFile: Difference between revisions

Jump to navigation Jump to search
Edited to turn regular links into vanilla: prefixes and to turn parallel: prefixes into regular links
m (1 revision imported: Imported from minecraft.wiki)
(Edited to turn regular links into vanilla: prefixes and to turn parallel: prefixes into regular links)
Line 21: Line 21:
end
end
-- local link = ( args.link or '' )
-- if mw.ustring.lower( link ) == 'none' then
-- link = ''
-- elseif link ~= '' then
-- local linkPrefix = ( not link:find( '//' ) and args.linkprefix ) or ''
-- link = linkPrefix .. link
-- end
-- Edited to turn regular links into vanilla: prefixes 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 26: Line 35:
elseif link ~= '' then
elseif link ~= '' then
local linkPrefix = ( not link:find( '//' ) and args.linkprefix ) or ''
local linkPrefix = ( not link:find( '//' ) and args.linkprefix ) or ''
if linkprefix == '' then  -- <- these are the added bits here
linkprefix = 'vanilla:' 
elseif linkprefix == 'parallel:' then
linkprefix = ''
end
link = linkPrefix .. link
link = linkPrefix .. link
end
end
local scale = args.scale or default.scale
local scale = args.scale or default.scale

Navigation menu