Skip to content

Commit 16c444b

Browse files
committed
[reveal] do not apply auto-stretch if aside is used
1 parent 90d5902 commit 16c444b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/format/reveal/format-reveal.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,15 +645,17 @@ function applyStretch(doc: Document, autoStretch: boolean) {
645645
const image = images[0];
646646
const imageEl = image as Element;
647647

648-
// screen out early specials divs (layout panels, columns, fragments, ...)
649648
if (
649+
// screen out early specials divs (layout panels, columns, fragments, ...)
650650
findParent(imageEl, (el: Element) => {
651651
return el.classList.contains("column") ||
652652
el.classList.contains("quarto-layout-panel") ||
653653
el.classList.contains("fragment") ||
654654
el.classList.contains(kOutputLocationSlide) ||
655655
!!el.className.match(/panel-/);
656-
})
656+
}) ||
657+
// Do not autostrech if an aside is used
658+
slideEl.querySelectorAll("aside").length !== 0
657659
) {
658660
continue;
659661
}

0 commit comments

Comments
 (0)