class Asciidoctor::Table
def partition_header_footer(attrs)
by the options on the table
Internal: Partition the rows into header, footer and body as determined
def partition_header_footer(attrs) # set rowcount before splitting up body rows num_body_rows = @attributes['rowcount'] = (body = @rows.body).size if num_body_rows > 0 if @has_header_option @rows.head = [body.shift.map {|cell| cell.reinitialize true }] num_body_rows -= 1 elsif @has_header_option.nil? @has_header_option = false body.unshift(body.shift.map {|cell| cell.reinitialize false }) end end @rows.foot = [body.pop] if num_body_rows > 0 && attrs['footer-option'] nil end