Difference between revisions of "Module:Demo"
From MINR.ORG WIKI
(←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 =...') |
|||
Line 7: | Line 7: | ||
local br = '' | local br = '' | ||
for k = 1, (args.br or 1) do | for k = 1, (args.br or 1) do | ||
− | br = br | + | br = br .. '<br>' |
end | 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]) | return string.format('<pre%s>%s</pre>%s%s', args.style and string.format(" style='%s'", args.style) or '', args[1], br, args[1]) |
Revision as of 16:23, 31 December 2014
Documentation for this module may be created at Module:Demo/doc
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