Skip to content

Commit 9698fa8

Browse files
committed
don't unroll figures and tables from cell-output-display
1 parent be7d443 commit 9698fa8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/resources/filters/layout/layout.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,11 @@ function partitionCells(divEl)
179179
heading = nil
180180
end
181181

182-
-- if this is .cell-output-display then unroll multiple blocks
183-
if cellDiv.attr.classes:find("cell-output-display") and #cellDiv.content > 1 then
182+
-- if this is .cell-output-display that isn't a figure or table
183+
-- then unroll multiple blocks
184+
if cellDiv.attr.classes:find("cell-output-display") and
185+
#cellDiv.content > 1 and
186+
not hasFigureOrTableRef(cellDiv) then
184187
for _,outputBlock in ipairs(cellDiv.content) do
185188
if outputBlock.t == "Div" then
186189
cells:insert(outputBlock)

0 commit comments

Comments
 (0)