Skip to content

Commit 198f4a5

Browse files
committed
floatref - when caption is taken on the table element, remove it from the table
this is because Quarto floatref processes the table caption and it needs to be removed from the table element so that it doesn't get inserted twice (cherry picked from commit 82ac7c2) crossref - use pandoc.Caption to reset table caption (cherry picked from commit 9272f7a)
1 parent 11f23b0 commit 198f4a5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/resources/filters/quarto-pre/parsefiguredivs.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ function parse_floatreftargets()
267267
if table.caption.long and next(table.caption.long) then
268268
found_caption = true
269269
caption = table.caption.long[1] -- what if there's more than one entry here?
270+
-- table caption should be removed from the table as we'll handle it
271+
table.caption = pandoc.Caption{}
270272
return table
271273
end
272274
end

0 commit comments

Comments
 (0)