Permanently protected module

Module:OutputBuffer

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by imported>The Earwig at 09:30, 14 December 2015 (Protected "Module:OutputBuffer": High-risk Lua module: over 10,000 mainspace transclusions ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

return function()
	local buffer = {}
	return function(sep)
		local b = buffer
		buffer = {}
		return table.concat(b, sep)
	end,
	function(text)
		buffer[#buffer + 1] = text
	end,
	function(...)
		buffer[#buffer + 1] = string.format(...)
	end
end