updates for new svg view/download links

This commit is contained in:
2023-05-28 15:56:56 -07:00
parent e3bf8dc139
commit 5d36def32c
9 changed files with 103 additions and 11 deletions

View File

@@ -116,9 +116,16 @@
const outline = [ ];
for (const heading of headings) {
const content = heading.cloneNode(true);
const anchor = content.querySelector('a.heading-anchor');
if (anchor) {
anchor.parentNode.removeChild(anchor);
}
outline.push(`
<li data-depth="${heading.tagName.toLowerCase()}">
<a href="#${heading.id}">${heading.innerText}</a>
<a href="#${heading.id}">${content.innerHTML}</a>
</li>
`);
}

View File

@@ -92,9 +92,16 @@
const outline = [ ];
for (const heading of headings) {
const content = heading.cloneNode(true);
const anchor = content.querySelector('a.heading-anchor');
if (anchor) {
anchor.parentNode.removeChild(anchor);
}
outline.push(`
<li data-depth="${heading.tagName.toLowerCase()}">
<a href="#${heading.id}">${heading.innerText}</a>
<a href="#${heading.id}">${content.innerHTML}</a>
</li>
`);
}