class Kramdown::Converter::Pdf
def render_table(el, opts)
def render_table(el, opts) data = [] el.children.each do |container| container.children.each do |row| data << [] row.children.each do |cell| if cell.children.any? {|child| child.options[:category] == :block} line = el.options[:location] warning("Can't render tables with cells containing block elements#{line ? " (line #{line})" : ''}") return end cell_data = inner(cell, opts) data.last << cell_data.map {|c| c[:text]}.join('') end end end with_block_padding(el, opts) do @pdf.table(data, :width => @pdf.bounds.right) do el.options[:alignment].each_with_index do |alignment, index| columns(index).align = alignment unless alignment == :default end end end end