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
119 120 121 122 123 124 125 126 127 128 |
# File 'lib/isodoc/html_function/postprocess_cover.rb', line 119 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 |