Changes
Jump to navigation
Jump to search
substitute blank if first arg is nil instead of error (allows TOC tab without words in article)
local p = {}
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame, {trim = false})
if args[1] or args[2] then
local toc = args[2] or args[1]
for k = 1, (tonumber(args.depth) or 1) do
toc = '=' .. toc .. '='
end
return '<div style="overflow:hidden;width:2px;height:2px;margin:-1px;display:inline-block;vertical-align:text-top;position:relative;top:-1em;">\n==' .. toc .. '==\n</div><div style="display:inline-block;margin:0;margin-left:-.625ex;">' .. (args[1] or '') .. '</div>'
end
return 'Missing arguments {{{1}}} and {{{2}}}'
end
return p
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame, {trim = false})
if args[1] or args[2] then
local toc = args[2] or args[1]
for k = 1, (tonumber(args.depth) or 1) do
toc = '=' .. toc .. '='
end
return '<div style="overflow:hidden;width:2px;height:2px;margin:-1px;display:inline-block;vertical-align:text-top;position:relative;top:-1em;">\n==' .. toc .. '==\n</div><div style="display:inline-block;margin:0;margin-left:-.625ex;">' .. (args[1] or '') .. '</div>'
end
return 'Missing arguments {{{1}}} and {{{2}}}'
end
return p