Module: Asciidoctor::Standoc::Table

Included in:
Converter
Defined in:
lib/asciidoctor/standoc/table.rb

Instance Method Summary collapse

Instance Method Details

#table(node) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/asciidoctor/standoc/table.rb', line 9

def table(node)
  @table_fn_number = "a"
  noko do |xml|
    xml.table **attr_code(table_attrs(node)) do |xml_table|
      table_name(node, xml_table)
      %i(head body foot).reject do |tblsec|
        node.rows[tblsec].empty?
      end
      table_head_body_and_foot node, xml_table
    end
  end
end

#table_attrs(node) ⇒ Object



4
5
6
7
# File 'lib/asciidoctor/standoc/table.rb', line 4

def table_attrs(node)
  { id: Utils::anchor_or_uuid(node),
    headerrows: node.attr("headerrows") }
end