Module:Icons: Difference between revisions

Fix - wrap class around image only (exclude text)
(Statue of Worship)
(Fix - wrap class around image only (exclude text))
Line 399: Line 399:
class = ovrClass
class = ovrClass
end
end
class = class ~= nil and class ~= '' and ' class="'..class..'"' or ''
-- There are a couple specific double overrides to be included that don't fit in the above lists
-- There are a couple specific double overrides to be included that don't fit in the above lists
if ambiguousOverrides[link] then
if ambiguousOverrides[link] then
Line 418: Line 417:
local txtLink = '|link=' .. (nolink and notext and '' or link)
local txtLink = '|link=' .. (nolink and notext and '' or link)
resultText = '[[File:' .. txtImg .. '|' .. txtSize .. 'x' .. txtSize .. 'px' .. txtLink .. ']]'
resultText = '[[File:' .. txtImg .. '|' .. txtSize .. 'x' .. txtSize .. 'px' .. txtLink .. ']]'
if class ~= nil and class ~= '' then
resultText = '<span class="'..class..'">'..resultText..'</span>'
end
end
end


Line 437: Line 439:
return '{| class="articletable" style="display:inline-block;vertical-align:middle;"\r\n|-\r\n|' .. resultText .. '\r\n|}'
return '{| class="articletable" style="display:inline-block;vertical-align:middle;"\r\n|-\r\n|' .. resultText .. '\r\n|}'
elseif not noicon then
elseif not noicon then
return '<span style="display:inline-block"'..class..'>' .. resultText .. '</span>'
return '<span style="display:inline-block">' .. resultText .. '</span>'
else
else
return resultText
return resultText
572

edits