require('strict')
local getArgs = require('Module:Arguments').getArgslocal p =
-- Close
function p.main(frame) local args = getArgs(frame) local wikitext = frame:preprocess(args[1]) local items = local out = for indent, item in wikitext:gmatch("(**) *([^\n]+)") do items[#items + 1] = end -- List of local toClose = -- Lowest depth of parent that forces all
for i, item in pairs(items) do out = out .. closePending(toClose, item[1]) -- Create a new list if needed if #toClose
\n' .. out .. '
' .. frame:extensionTagend
return p