Module:Testpages

La bibliothèque libre.

La documentation pour ce module peut être créée à Module:Testpages/Documentation

-- test Lua
-- NE PAS UTILISER
local p = {}

function p.main(frame)
	local args = frame.args
	args.from= tonumber(args.from)
	args.to = tonumber(args.to)
	local out = ""
	
	out = frame:extensionTag{ name = 'pages', args = { index = args.index, from = args.from, to = args.to } }
	out = p.modernisation(out)
	
	--[[
	local page_i = args.from
	local page_content = ''
	while ( page_i <= args.to ) do
		page_content = frame:expandTemplate{ title = ('Page:' .. args.index .. '/' .. page_i) }
		if (args.modernisation ~= nil ) then
			page_content = p.modernisation(page_content)
		end
		out = out .. page_content
		page_i = page_i + 1
	end
	--]]
			
	-- On retourne le résultat
	return out
			
end


function p.modernisation(txt)
	txt = mw.ustring.gsub(txt, 'ſ', 's')
	return txt
			
end
	
return p