Support table and table column sizing
All checks were successful
CI Pipeline / build (pull_request) Successful in 13s
All checks were successful
CI Pipeline / build (pull_request) Successful in 13s
This commit is contained in:
@@ -100,8 +100,8 @@ module Notare
|
||||
@current_list.add_item(item)
|
||||
end
|
||||
|
||||
def table(style: nil, &block)
|
||||
tbl = Nodes::Table.new(style: resolve_table_style(style))
|
||||
def table(style: nil, layout: nil, columns: nil, &block)
|
||||
tbl = Nodes::Table.new(style: resolve_table_style(style), layout: layout, columns: columns)
|
||||
previous_table = @current_table
|
||||
@current_table = tbl
|
||||
block.call
|
||||
@@ -118,8 +118,8 @@ module Notare
|
||||
@current_table.add_row(row)
|
||||
end
|
||||
|
||||
def td(text = nil, &block)
|
||||
cell = Nodes::TableCell.new
|
||||
def td(text = nil, width: nil, &block)
|
||||
cell = Nodes::TableCell.new(width: width)
|
||||
if block
|
||||
with_target(cell, &block)
|
||||
elsif text
|
||||
|
||||
Reference in New Issue
Block a user