Module:Sandbox/BrandonXLF/2/example
< Module:Sandbox | BrandonXLF | 2
Jump to navigation
Jump to search
Revision as of 02:33, 2 January 2019 by blackwiki>BrandonXLF
Documentation for this module may be created at Module:Sandbox/BrandonXLF/2/example/doc
--[[ This module acts like example templates for the parent modules documetaion page ]]--
local p = {}
function p.main (frame)
local out = ''
local args = frame.args
local module = 'Sandbox/BrandonXLF/2'
local wikitext = {
[1] = '{{#invoke:Sandbox/BrandonXLF/2|main|item|, }}',
[2] = '{{#invoke:Sandbox/BrandonXLF/2|main||, ||| and }}',
[3] = '{{#invoke:Sandbox/BrandonXLF/2|main||, |•|•| and }}',
[4] = '{{#invoke:Sandbox/BrandonXLF/2|main|x| & }}',
[5] = '{{#invoke:Sandbox/BrandonXLF/2|main|x| & |item $i: }}',
[6] = '{{#invoke:Sandbox/BrandonXLF/2|bulleted}}',
[7] = '{{#invoke:Sandbox/BrandonXLF/2|unbulleted}}',
[8] = '{{#invoke:Sandbox/BrandonXLF/2|horizontal}}',
[9] = '{{#invoke:Sandbox/BrandonXLF/2|ordered}}',
[10] = '{{#invoke:Sandbox/BrandonXLF/2|commas}}',
[11] = '{{#invoke:Sandbox/BrandonXLF/2|list}}',
}
if args['CODE'] then
out = '<pre>'..wikitext[tonumber(args['EXAMPLE'])]..'</pre>'
else
out = frame:preprocess(wikitext[tonumber(args['EXAMPLE'])])
end
return out
end
return p