# File lib/asciidoctor/converter/html5.rb, line 327
    def section node
      slevel = node.level
      htag = %(h#{slevel + 1})
      id_attr = anchor = link_start = link_end = nil
      if node.id
        id_attr = %( id="#{id = node.id}")
        if (doc = node.document).attr? 'sectanchors'
          anchor = %(<a class="anchor" href="##{id}"></a>)
          # possible idea - anchor icons GitHub-style
          #if doc.attr? 'icons', 'font'
          #  anchor = %(<a class="anchor" href="##{id}"><i class="fa fa-anchor"></i></a>)
          #else
          #  anchor = %(<a class="anchor" href="##{id}"></a>)
          #end
        end
        if doc.attr? 'sectlinks'
          link_start = %(<a class="link" href="##{id}">)
          link_end = '</a>'
        end
      end

      if slevel == 0
        %(<h1#{id_attr} class="sect0">#{anchor}#{link_start}#{node.title}#{link_end}</h1>
#{node.content})
      else
        class_attr = (role = node.role) ? %( class="sect#{slevel} #{role}") : %( class="sect#{slevel}")
        sectnum = if node.numbered && !node.caption && slevel <= (node.document.attr 'sectnumlevels', 3).to_i
          %(#{node.sectnum} )
        end
        %(<div#{class_attr}>
<#{htag}#{id_attr}>#{anchor}#{link_start}#{sectnum}#{node.captioned_title}#{link_end}</#{htag}>
#{slevel == 1 ? %[<div class="sectionbody">\n#{node.content}\n</div>] : node.content}
</div>)
      end
    end