Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a3ff3c242e6098f1

Jump to content

Module:Anchored list/sandbox

From Wikipedia, the free encyclopedia
local yesno = require('Module:Yesno')
local getArgs = require('Module:Arguments').getArgs
local p = {}

-- Argument handling
function p.generate(frame)
	local args = getArgs(frame)
	return p._generate(args)
end

-- Actual function
function p._generate(args)
	local _style = ''
	if not (args.style == '' or args.style == nil) then
		_style = ' style="' .. args.style .. '"'
	end
	local output = '<ol' .. _style .. '>'
	for i,item in ipairs(args) do
		if item ~= '' and not yesno(args.bare) then
			output = output .. '<li ' .. _style .. 'id="alist' .. (args.name or '')  .. '-' .. i .. '">' .. item .. '</li>'
		elseif item ~= '' and yesno(args.bare) then
			output = output .. '<li ' .. _style .. 'id="' .. i ..'">' .. item .. '</li>'
		end
	end
	return output .. '</ol>'
end
return p