Module:Crafting: Difference between revisions

m
This should be edge cases included
m (Has to be the div)
m (This should be edge cases included)
Line 117: Line 117:


local link = args['link'] or args['Link']
local link = args['link'] or args['Link']
if link then
if link and #link ~= 0 then
spriteDiv:wikitext( link )
if link:sub( 1,2 ) == '[[' and link:sub( #link-2,#link ) ~= '|]]' then
spriteDiv:wikitext( link:sub( 1,#link-2 ) .. '|]]' )
elseif link:sub ( 1,1 ) == '[' and link:sub ( #link-1, #link ) ~= '|]' then
spriteDiv:wikitext( link:sub( 1,#link-1 ) .. '|]' )
end
end
end


Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,659

edits