local zes = {} function zes.main(frame) local args = frame.args local content = args.content or args[1] local root = mw.html.create 'div' local current = root local level = 0 local next = '' for each in mw.text.gsplit(content,'\n') do if each:match('^'..next..'^:') then current = current:tag 'div' end end end