Jump to content

Module:Anchored list

From BattleIntelligence
Revision as of 11:40, 3 November 2023 by imported>Deadfire (Creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

local p = {}
p.generate = function (frame)
	local output = "<ol style=\"" .. (frame.style or " ") .. "\" name=\"" .. (frame.name or "") .. "\">"
	for i,item in ipairs(frame.args) do
		if item ~= "" then
			output = output .. "<li style=\"" .. (frame.style or " ") .. "\" id=\"alist" .. (frame.name or "")  .. "-" .. i .. "\">" .. item .. "</li>"
		end
	end
	return output .. "</ol>"
end
return p