Module:Apitag
Documentation for this module may be created at Module:Apitag/doc
-- https://wowpedia.fandom.com/wiki/Template:Apitag
local m = {}
-- https://stackoverflow.com/a/7615129/1297035
local function strsplit(input, sep)
local t = {}
for s in string.gmatch(input, "([^"..sep.."]+)") do
table.insert(t, s)
end
return t
end
local function FormatTags(s)
local tags = strsplit(s, ",")
local t = {}
for _, v in pairs(tags) do
table.insert(t, string.format("<code><font color=#dda0dd>#%s</font></code>", v))
end
return table.concat(t)
end
function m.main(f)
return FormatTags(f.args[1])
end
return m