Skip to content

Commit 1906da6

Browse files
committed
Ensure proper Callout rendering if title is set but empty
1 parent 602004b commit 1906da6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/resources/filters/customnodes/callout.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ function _callout_main()
264264
return _quarto.format.typst.function_call("callout", {
265265
{ "body", _quarto.format.typst.as_typst_content(callout.content) },
266266
{ "title", _quarto.format.typst.as_typst_content(
267-
callout.title or pandoc.Plain(_quarto.modules.callouts.displayName(callout.type))
267+
(_quarto.utils.is_empty_node(callout.title) and callout.title) or
268+
pandoc.Plain(_quarto.modules.callouts.displayName(callout.type))
268269
)},
269270
{ "background_color", pandoc.RawInline("typst", background_color) },
270271
{ "icon_color", pandoc.RawInline("typst", icon_color) },
@@ -406,4 +407,4 @@ function crossref_callouts()
406407
return callout
407408
end
408409
}
409-
end
410+
end

0 commit comments

Comments
 (0)