From f1bd06eb4a327ca686229cfa13fa730744dcd22d Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 13 Apr 2020 10:08:38 +0200 Subject: Lua: support new tables --- data/pandoc.lua | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'data') diff --git a/data/pandoc.lua b/data/pandoc.lua index d1c88d0a1..e9b6209c3 100644 --- a/data/pandoc.lua +++ b/data/pandoc.lua @@ -556,26 +556,27 @@ M.RawBlock = M.Block:create_constructor( --- Creates a table element. -- @function Table --- @tparam {Inline,...} caption table caption --- @tparam {AlignDefault|AlignLeft|AlignRight|AlignCenter,...} aligns alignments --- @tparam {int,...} widths column widths --- @tparam {Block,...} headers header row --- @tparam {{Block,...}} rows table rows --- @treturn Block table element +-- @tparam Attr attr attributes +-- @tparam Caption caption table caption +-- @tparam {ColSpec,...} colspecs column alignments and widths +-- @tparam TableHead head table head +-- @tparam {TableBody,..} bodies table bodies +-- @treturn TableFoot foot table foot M.Table = M.Block:create_constructor( "Table", - function(caption, aligns, widths, headers, rows) + function(attr, caption, colspecs, head, bodies, foot) return { c = { - ensureInlineList(caption), - List:new(aligns), - List:new(widths), - List:new(headers), - List:new(rows) + attr, + caption, + List:new(colspecs), + head, + List:new(bodies), + foot } } end, - {"caption", "aligns", "widths", "headers", "rows"} + {"attr", "caption", "colspecs", "head", "bodies", "foot"} ) -- cgit v1.2.3