Module:Headless TOC

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 '\n==' .. toc .. '==\n ' .. (args[1] or '') .. ' '	end return 'Missing arguments and ' end

return p