Jump to content

Module:Demo

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Codehydro (talk | contribs) at 15:22, 31 December 2014 (Created page with 'local p = {} function p.main(frame) args = require('Module:Arguments').getArgs(frame, { trim = false }) local br = '' for k = 1, (args.br or 1) do br =...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}

function p.main(frame)
	args = require('Module:Arguments').getArgs(frame, {
		trim = false
	})
	local br = ''
	for k = 1, (args.br or 1) do
		br = br + '<br>'
	end
	return string.format('<pre%s>%s</pre>%s%s', args.style and string.format(" style='%s'", args.style) or '', args[1], br, args[1])
end

return p