# File lib/maruku/output/to_html.rb, line 805 def to_html_table num_columns = self.align.size # The table data is passed as a multi-dimensional array # we just need to split the head from the body head, *rows = @children table = html_element('table') thead = xelem('thead') tr = xelem('tr') array_to_html(head).inject(tr, &:<<) thead << tr table << thead tbody = xelem('tbody') rows.each do |row| tr = xelem('tr') array_to_html(row).each_with_index do |x, i| x['style'] ="text-align: #{self.align[i].to_s};" tr << x end tbody << tr << xml_newline end table << tbody end