class Asciidoctor::HTML5::SectionTemplate

Public Instance Methods

template() click to toggle source
# File lib/asciidoctor/backends/html5.rb, line 166
  def template
    @template ||= @eruby.new "<%#encoding:UTF-8%><%
if @level == 0 %>
<h1#{id}><%= title %></h1>
<%= content %>
<% else %>
<div class="sect<%= @level %>#{role_class}">
  <h<%= @level + 1 %>#{id}><% if !@special && (attr? :numbered) && @level < 4 %><%= sectnum %> <% end %><%= attr :caption %><%= title %></h<%= @level + 1 %>>
  <% if @level == 1 %>
  <div class="sectionbody">
<%= content %>
  </div>
  <% else %>
<%= content %>
  <% end %>
</div>
<% end %>
"
  end