Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/resources/filters/layout/pandoc3_figure.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function render_pandoc3_figure()
if figure.caption.long ~= nil then
image.caption = quarto.utils.as_inlines(figure.caption.long)
end
-- TODO need to find all correct classes to forward
if figure.classes:includes("margin-caption") then
image.classes:insert("margin-caption")
end
return htmlImageFigure(image)
end

Expand Down
15 changes: 15 additions & 0 deletions tests/docs/smoke-all/2024/01/05/8066.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "Test"
format:
html:
fig-cap-location: margin
_quarto:
tests:
html:
ensureHtmlElements:
-
- "figcaption.margin-caption"
- []
---

![Test figure caption](https://placeholder.co/400)