Class: Kramdown::Converter::Html

Inherits:
Object
  • Object
show all
Defined in:
lib/mmarkdown/toc_html_converter.rb

Class Method Summary collapse

Class Method Details

.convert_toc(toc, option = {}) ⇒ Object



6
7
8
9
10
# File 'lib/mmarkdown/toc_html_converter.rb', line 6

def self.convert_toc toc, option = {}
  converter = new(Element.new(:root), ::Kramdown::Options.merge(option))
  toc_tree = converter.generate_toc_tree(toc, :ul, {})
  return converter.convert(toc_tree, 0)
end