|
|
Line 1: |
Line 1: |
| -- Implements Template:Twemoji
| | print("Total nigger death") |
| | |
| local p = {}
| |
| | |
| function p.main(frame)
| |
| local inp = frame.args[1]
| |
| local beginspan = "<span class='nowrap'>"
| |
| local size = "20px"
| |
|
| |
| if (frame.args[2] and not(frame.args[2] == ""))
| |
| then
| |
| beginspan = "<span class='nowrap' title='" .. frame.args[2] .. "'>"
| |
| end
| |
|
| |
| if (frame.args[3] and not(frame.args[3] == ""))
| |
| then
| |
| size = frame.args[3]
| |
| end
| |
|
| |
| if (mw.ustring.match(inp, "[A-z0-9-]"))
| |
| then
| |
| return beginspan .. "[[File:Twemoji12 " .. inp .. ".svg|".. size .."|link=|alt=]]</span>"
| |
| else
| |
| local cps = {}
| |
| local i = 1
| |
|
| |
| for codepoint in mw.ustring.gcodepoint(inp) do
| |
| cps[i] = string.format("%x", codepoint)
| |
| i = i + 1
| |
| end
| |
|
| |
| local output = table.concat(cps, "-")
| |
|
| |
| return beginspan .. "[[File:Twemoji12 " .. output .. ".svg|".. size .."|link=|alt=" .. inp .. "]]</span>"
| |
| end
| |
| end
| |
| | |
| return p
| |
Revision as of 19:41, 16 September 2024
Documentation for this module may be created at Module:Twemoji/doc
print("Total nigger death")