Skip to content

Commit 7a25b1b

Browse files
committed
Use global function to check if caption if empty
1 parent 5f86f4b commit 7a25b1b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/resources/filters/ast/customnodes.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,12 @@ _quarto.ast = {
343343
end
344344
local inner_node = node.content[index]
345345
local innertype = pandoc.utils.type(inner_node)
346+
if key == 'caption_long' then
347+
io.stderr:write('Setting caption_long: ' .. tostring(value) ..'\n')
348+
if type(value) == 'userdata' then
349+
io.stderr:write(debug.traceback())
350+
end
351+
end
346352
if innertype == 'Block' then
347353
inner_node.content = quarto.utils.as_blocks(value)
348354
elseif innertype == 'Inline' then

src/resources/filters/layout/typst.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function make_typst_figure(tbl)
1111
local identifier = tbl.identifier
1212
local separator = tbl.separator
1313

14-
if (not caption or #caption.content == 0) and tbl.separator == nil then
14+
if _quarto.utils.is_empty_node(caption) and tbl.separator == nil then
1515
separator = ""
1616
end
1717

0 commit comments

Comments
 (0)