Module:Twemoji: Difference between revisions

Implement image alts
No edit summary
(Implement image alts)
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
local size = "20px"
local size = "20px"
if (frame.args[2])
if (frame.args[2] and not(frame.args[2] == ""))
then
then
beginspan = "<span class='nowrap' title='" .. frame.args[2] .. "'>"
beginspan = "<span class='nowrap' title='" .. frame.args[2] .. "'>"
end
end
if (frame.args[3])
if (frame.args[3] and not(frame.args[3] == ""))
then
then
size = frame.args[3]
size = frame.args[3]
Line 32: Line 32:
local output = table.concat(cps, "-")
local output = table.concat(cps, "-")
return beginspan .. "[[File:Twemoji12 " .. output .. ".svg|".. size .."|link=|alt=]]</span>"
return beginspan .. "[[File:Twemoji12 " .. output .. ".svg|".. size .."|link=|alt=" .. inp .. "]]</span>"
end
end
end
end


return p
return p