Content deleted Content added
add new mode "dlistpara", which uses Template:para |
test |
||
(5 intermediate revisions by the same user not shown) | |||
Line 68:
function p._check(args)
local title = args.
return string.format(
'{{#invoke:Check for unknown parameters|check|unknown=' ..
Line 91:
end
local title = args.
return string.format([[ <nowiki>{{%s
%s}}</nowiki>]], title, strMap(parameters,
function(s)
if definitions then
Line 102:
end
end))
end
function p._flatcode(args)
local parameters = extractParams(args.base)
local title = args.base or mw.title.getCurrentTitle().baseText
return string.format(' {{tlp|%s%s}}', title, strMap(parameters,
function(s)
return string.format(' |%s{{=}}<var>%s</var> ', s, s)
end)
)
end
Line 161 ⟶ 171:
function p._demo(args)
local title = args.
return string.format('{{Parameter names example%s|%s}}', title,
table.concat(extractParams(args.base), '|'))
Line 194 ⟶ 204:
function(s) return string.format('* %s\n', s) end)
end
p.check = makeInvokeFunction('_check')
p.code = makeInvokeFunction('_code')
p.flatcode = makeInvokeFunction('_flatcode')
p.compare = makeInvokeFunction('_compare')
p.demo = makeInvokeFunction('_demo')
|