Method: IsoDoc::HtmlFunction::Html#html_toc
- Defined in:
- lib/isodoc/html_function/postprocess_cover.rb
#html_toc(docxml) ⇒ Object
needs to be same output as toclevel
125 126 127 128 129 130 131 132 133 134 |
# File 'lib/isodoc/html_function/postprocess_cover.rb', line 125 def html_toc(docxml) idx = html_toc_init(docxml) or return docxml path = toclevel_classes.map do |x| x.map { |l| "//main//#{l}#{toc_exclude_class}" } end toc = html_toc_entries(docxml, path) .map { |k| k[:entry] }.join("\n") idx << "<ul>#{toc}</ul>" docxml end |