lib/kitabu/toc/html.rb
def to_html
        "".tap do |html|
          toc.each do |options|
            html << %[
              <div class="level#{options[:level]} #{options[:permalink]}">
                <a href="##{options[:permalink]}">
                  <span>#{CGI.escape_html(options[:text])}</span>
                </a>
              </div>
            ]
          end
        end
      end
# Return the table of contents in HTML format.
#
Return the table of contents in HTML format.
Return the table of contents in HTML format .
def to_html
        "".tap do |html|
          toc.each do |options|
            html << %[
              <div class="level#{options[:level]} #{options[:permalink]}">
                <a href="##{options[:permalink]}">
                  <span>#{CGI.escape_html(options[:text])}</span>
                </a>
              </div>
            ]
          end
        end
      end
def to_html "" . tap do | html | toc . each do | options | html << %[
              <div class="level#{options[:level]} #{options[:permalink]}">
                <a href="##{options[:permalink]}">
                  <span>#{CGI.escape_html(options[:text])}</span>
                </a>
              </div>
            ] end end end
Return the table of contents in HTML format.
Return the table of contents in HTML format .