Skip to content

Commit f8e3406

Browse files
committed
revealjs 5 - Links to element in slide by id work in latest reveal.js
So no need to tweak a reference by slide. Added feature : hakimel/reveal.js#3444
1 parent ab54b2d commit f8e3406

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/format/reveal/format-reveal.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -783,23 +783,6 @@ const handleAnchors = (doc: Document) => {
783783
const codeLineAnchorEl = codeLineAnchor as Element;
784784
codeLineAnchorEl.removeAttribute("href");
785785
});
786-
787-
// https://github.com/quarto-dev/quarto-cli/issues/3533
788-
// redirect anchors to the slide they refer to
789-
const anchors = doc.querySelectorAll("a[href^='#/']");
790-
for (const anchor of anchors) {
791-
const anchorEl = anchor as Element;
792-
const href = anchorEl.getAttribute("href");
793-
if (href) {
794-
const target = doc.getElementById(href.replace(/^#\//, ""));
795-
if (target) {
796-
const slide = findParentSlide(target);
797-
if (slide && slide.getAttribute("id")) {
798-
anchorEl.setAttribute("href", `#/${slide.getAttribute("id")}`);
799-
}
800-
}
801-
}
802-
}
803786
};
804787

805788
const handleInterColumnDivSpaces = (doc: Document) => {

0 commit comments

Comments
 (0)