Skip to content

Commit

Permalink
mark all HTML float divs with quarto-float in support of #7472
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Dec 19, 2023
1 parent 2340217 commit 61188c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/format/html/format-html-bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,8 @@ const processMarginNodes = (
const findQuartoFigure = (el: Element): Element | undefined => {
if (
el.classList.contains("quarto-figure") ||
el.classList.contains("quarto-layout-panel")
el.classList.contains("quarto-layout-panel") ||
el.classList.contains("quarto-float")
) {
return el;
} else if (el.parentElement) {
Expand Down
1 change: 1 addition & 0 deletions src/resources/filters/customnodes/floatreftarget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ function float_reftarget_render_html_figure(float)
div.attr.classes:insert("quarto-figure")
div.attr.classes:insert("quarto-figure-" .. figure_attrs.align)
end
div.attr.classes:insert("quarto-float")

-- also forward any column or caption classes
local currentClasses = found_image.attr.classes
Expand Down

0 comments on commit 61188c0

Please sign in to comment.