From 5395266952a6f063c022a8b130d43ec19a664e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Novotn=C3=BD?= Date: Fri, 21 Jul 2023 01:05:29 +0200 Subject: [PATCH] React to option tableAttributes in extensions.pipe_tables reader --- markdown.dtx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/markdown.dtx b/markdown.dtx index 0e083db86..d04ba5757 100644 --- a/markdown.dtx +++ b/markdown.dtx @@ -29619,7 +29619,7 @@ end % % \end{markdown} % \begin{macrocode} -M.extensions.pipe_tables = function(table_captions, table_attributes) -- luacheck: ignore table_attributes +M.extensions.pipe_tables = function(table_captions, table_attributes) local function make_pipe_table_rectangular(rows) local num_columns = #rows[2] @@ -29771,7 +29771,19 @@ M.extensions.pipe_tables = function(table_captions, table_attributes) -- luachec if table_captions then table_caption = #table_caption_beginning * table_caption_beginning - * Ct(parsers.IndentedInline^1) + if table_attributes then + table_caption = table_caption + * Ct((parsers.IndentedInline + -( parsers.optionalspace + * parsers.attributes))^0) + * parsers.optionalspace + * Ct(parsers.attributes) + * parsers.optionalspace + else + table_caption = table_caption + * Ct(parsers.IndentedInline^0) + end + table_caption = table_caption * parsers.newline else table_caption = parsers.fail