Skip to content

Commit

Permalink
Add renderers tableCaptionContext* to extensions.pipe_tables writer
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Jul 20, 2023
1 parent cd33b9c commit d49647e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -29567,8 +29567,13 @@ M.extensions.pipe_tables = function(table_captions, table_attributes) -- luachec
%
% \end{markdown}
% \begin{macrocode}
function self.table(rows, caption)
function self.table(rows, caption, attributes)
if not self.is_writing then return "" end
if attributes ~= nil then
table.insert(buf,
"\\markdownRendererTableAttributeContextBegin\n")
table.insert(buf, self.attributes(attributes))
end
local buffer = {"\\markdownRendererTable{",
caption or "", "}{", #rows - 1, "}{", #rows[1], "}"}
local temp = rows[2] -- put alignments on the first row
Expand All @@ -29587,6 +29592,10 @@ M.extensions.pipe_tables = function(table_captions, table_attributes) -- luachec
end
table.insert(buffer, "}")
end
if attributes ~= nil then
table.insert(buf,
"\\markdownRendererTableAttributeContextEnd{}")
end
return buffer
end
end, extend_reader = function(self)
Expand Down

0 comments on commit d49647e

Please sign in to comment.