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:08, 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 i = 0
	local output = "<ol style=\"" .. (frame.style or "") .. "\" name=\"" .. (frame.name or "") .. "\">"
	for item in frame.args do
		i = i + 1
		output = output .. "<li style=\"" .. (frame.style or "") .. "\" id=\"alist" .. (frame.name or "")  .. "-" .. i .. "\">" .. item .. "</li>"
	end
	
	return output .. "</ol>"
end
return p