Skip to content

Commit

Permalink
fix: cross reference links in HTML
Browse files Browse the repository at this point in the history
fix #653
  • Loading branch information
davidgohel committed Sep 2, 2024
1 parent c7ceb26 commit ef5cb8e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: flextable
Title: Functions for Tabular Reporting
Version: 0.9.7.011
Version: 0.9.7.012
Authors@R: c(
person("David", "Gohel", , "[email protected]", role = c("aut", "cre")),
person("ArData", role = "cph"),
Expand Down
13 changes: 12 additions & 1 deletion inst/web_1.1.3/tabwid.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,16 @@ document.addEventListener("DOMContentLoaded", function(event) {
fantome.appendChild(tabwid_link.cloneNode(true));
}
});
});

const shadowHosts = document.querySelectorAll('.flextable-shadow-host');
shadowHosts.forEach(host => {
if (host.shadowRoot) {
const spanElements = host.shadowRoot.querySelector('div > table > caption > span[id]');
if (spanElements) {
const id = spanElements.getAttribute("id");
host.setAttribute("id", id);
}
}
});

});

0 comments on commit ef5cb8e

Please sign in to comment.