Support table and table column sizing
All checks were successful
CI Pipeline / build (pull_request) Successful in 13s

This commit is contained in:
2025-12-03 13:50:56 +01:00
parent 00cabb6dfb
commit 843466549a
13 changed files with 520 additions and 30 deletions

View File

@@ -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