Skip to content

Commit 71b59f4

Browse files
committed
revealjs postprocessor - improve fix for #6800 regression
1 parent 47d43ae commit 71b59f4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/format/reveal/format-reveal.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,17 @@ function revealHtmlPostprocessor(
466466
const slideContentFromQuarto = (slide as Element).querySelector(
467467
".quarto-auto-generated-content",
468468
);
469-
if (slideContentFromQuarto) {
469+
if (
470+
slideContentFromQuarto &&
471+
(slide as Element).getAttribute("data-visibility") === "hidden"
472+
) {
470473
if (slideContentFromQuarto.childElementCount === 0) {
471474
slideContentFromQuarto.remove();
472475
} else {
473476
for (const otherSlide of doc.querySelectorAll("section.slide")) {
474477
if (
475-
(otherSlide as Element).getAttribute("visibility") !== "hidden"
478+
(otherSlide as Element).getAttribute("data-visibility") !==
479+
"hidden"
476480
) {
477481
otherSlide.appendChild(slideContentFromQuarto);
478482
break;

0 commit comments

Comments
 (0)