lib/kramdown/converter/toc.rb in kramdown-0.14.1 vs lib/kramdown/converter/toc.rb in kramdown-0.14.2

- old
+ new

@@ -46,19 +46,19 @@ def convert(el) if el.type == :header && in_toc?(el) attr = el.attr.dup attr['id'] = generate_id(el.options[:raw_text]) if @options[:auto_ids] && !attr['id'] - add_to_toc(el, attr['id'], @toc) if attr['id'] + add_to_toc(el, attr['id']) if attr['id'] else el.children.each {|child| convert(child)} end @toc end private - def add_to_toc(el, id, toc) + def add_to_toc(el, id) toc_element = Element.new(:toc, el, :id => id) success = false while !success if @stack.empty?