# File lib/asciidoctor/backends/html5.rb, line 691 def template @template ||= @eruby.new <%#encoding:UTF-8%><table#{id} class="tableblock frame-<%= attr :frame, 'all' %> grid-<%= attr :grid, 'all'%>#{role_class}" style="<%if !(attr? 'autowidth-option') %>width:<%= attr :tablepcwidth %>%; <% end %><%if attr? :float %>float: <%= attr :float %>; <% end %>"><%if title? %><caption class="title"><% unless @caption.nil? %><%= @caption %><% end %><%= title %></caption><%endif (attr :rowcount) >= 0 %><colgroup><% if attr? 'autowidth-option' @columns.each do %><col><% end else @columns.each do |col| %><col style="width:<%= col.attr :colpcwidth %>%;"><% end end %> </colgroup><% [:head, :foot, :body].select {|tsec| !@rows[tsec].empty? }.each do |tsec| %><t<%= tsec %>><% @rows[tsec].each do |row| %><tr><% row.each do |cell| %><<%= tsec == :head ? 'th' : 'td' %> class="tableblock halign-<%= cell.attr :halign %> valign-<%= cell.attr :valign %>"#{attribute('colspan', 'cell.colspan')}#{attribute('rowspan', 'cell.rowspan')}<% cell_content = '' if tsec == :head cell_content = cell.text else case (cell.attr 'style', nil, false) when :asciidoc cell_content = %(<div>\#{cell.content}</div>) when :verse cell_content = %(<div class="verse">\#{template.preserve_endlines(cell.text, self)}</div>) when :literal cell_content = %(<div class="literal monospaced"><pre>\#{template.preserve_endlines(cell.text, self)}</pre></div>) when :header cell.content.each do |text| cell_content = %(\#{cell_content}<p class="tableblock header">\#{text}</p>) end else cell.content.each do |text| cell_content = %(\#{cell_content}<p class="tableblock">\#{text}</p>) end end end %><%= (@document.attr? 'cellbgcolor') ? %( style="background-color:\#{@document.attr 'cellbgcolor'};") : nil %>><%= cell_content %></<%= tsec == :head ? 'th' : 'td' %>><% end %></tr><% end %></t<%= tsec %>><% endend %></table> end
Generated with the Darkfish Rdoc Generator 2.