Skip to content

Commit 84a9714

Browse files
committed
fix non-simple docx callouts
1 parent 752452f commit 84a9714

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ function calloutLatex(node)
365365
local type = node.type
366366
local calloutAppearance = node.appearance
367367
local icon = node.icon
368-
local div = pandoc.Div({})
369368

370369
-- generate the callout box
371370
local callout
@@ -524,7 +523,6 @@ function calloutDocx(node)
524523
end
525524

526525
function calloutDocxDefault(node, type, hasIcon)
527-
local div = pandoc.Div({})
528526
local caption = node.caption
529527
local color = htmlColorForType(type)
530528
local backgroundColor = htmlBackgroundColorForType(type)
@@ -606,7 +604,7 @@ function calloutDocxDefault(node, type, hasIcon)
606604
calloutContents:insert(pandoc.Div(pandoc.RawBlock("openxml", tableMiddle)))
607605

608606
-- the main contents of the callout
609-
local contents = div.content
607+
local contents = node.content
610608

611609
-- ensure there are no nested callouts
612610
if contents:find_if(function(el)
@@ -634,7 +632,6 @@ end
634632

635633

636634
function calloutDocxSimple(node, type, hasIcon)
637-
local div = pandoc.Div({})
638635
local color = htmlColorForType(type)
639636
local caption = node.caption
640637

0 commit comments

Comments
 (0)