Jump to content

Module:Anchored list

From Wikipedia, the free encyclopedia

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