184
edits
Tag: Rollback |
(this may be dumb but maybe smart) |
||
Line 121: | Line 121: | ||
spriteDiv:addClass("enchanted") | spriteDiv:addClass("enchanted") | ||
end | end | ||
local link = args['link'] or args['Link'] | |||
if link and #link ~= 0 then | |||
if link:sub( 1,2 ) == '[[' then | |||
parentDiv:wikitext(link:sub( 1,#link-2 ) + '|') | |||
elseif link:sub ( 1,1 ) == '[' then | |||
parentDiv:wikitext(link:sub( 1,#link-1 ) + '|') | |||
end | |||
end | |||
parentDiv:node(spriteDiv) | parentDiv:node(spriteDiv) | ||
if link and #link ~= 0 then | |||
if link:sub( 1,2 ) == '[[' then | |||
parentDiv:wikitext(']]') | |||
elseif link:sub ( 1,1 ) == '[' then | |||
parentDiv:wikitext(']') | |||
end | |||
end | |||
return parentDiv | return parentDiv |