Jump to content

Module:Anchored list

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Afkirby (talk | contribs) at 18:14, 28 January 2023. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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
		output = output .. "<li style=\"" .. (frame.style or " ") .. "\" id=\"alist" .. (frame.name or "")  .. "-" .. i .. "\">" .. item .. "</li>"
	end
	
	return output .. "</ol>"
end
return p