/ This template is used only for toc::[] macro; for document and preamble TOC
/ see document.html, preamble.html and _toc.html.
- if document.attr? :toc
  - toc_id = id || ('toc' if document.embedded? || !document.attr?('toc-placement'))
  nav id=toc_id class=(attr :role, (document.attr 'toc-class', 'toc')) role='doc-toc'
    h level=(section_level + 2) id=("#{toc_id}-title" if toc_id)
      =(title || (document.attr 'toc-title'))
    / Renders outline.html.
    = converter.convert document, 'outline', :toclevels=>((attr :levels).to_i if attr? :levels)

/ This template is used only for toc::[] macro; for document and preamble TOC
/ see document.html, preamble.html and _toc.html.
- if document.attr? :toc
  - toc_id = id || ('toc' if document.embedded? || !document.attr?('toc-placement'))
  nav id=toc_id class=(attr :role, (document.attr 'toc-class', 'toc')) role='doc-toc'
    h level=(level + 2) id=("#{toc_id}-title" if toc_id)
      =(title || (document.attr 'toc-title'))
    / Renders outline.html.
    = converter.convert document, 'outline', :toclevels=>((attr :levels).to_i if attr? :levels)

Fix undefined method error in toc template when toc::[] in preamble
Fix undefined method error in toc template when toc::[] in preamble

Fixes #1

jirutka/asciidoctor-html5,jirutka/asciidoctor-html5