Module:Sprite: Difference between revisions
Nowrap the whole damn thing because CSS... |
Move nowrap span inside links |
||
| Line 86: | Line 86: | ||
end | end | ||
local content = '<span class="nowrap">' .. sprite .. text .. '</span>' | |||
if link ~= '' and mw.ustring.lower( link ) ~= 'none' then | if link ~= '' and mw.ustring.lower( link ) ~= 'none' then | ||
if link:find( '//' ) then | if link:find( '//' ) then | ||
-- External link | -- External link | ||
return ' | return '[' .. link .. ' ' .. content .. ']' | ||
else | else | ||
-- Internal link | -- Internal link | ||
local linkPrefix = args.linkprefix or default.linkprefix or '' | local linkPrefix = args.linkprefix or default.linkprefix or '' | ||
return ' | return '[[' .. linkPrefix .. link .. '|' .. content .. ']]' | ||
end | end | ||
else | else | ||
return | return content | ||
end | end | ||
end | end | ||