Skip to content

Commit

Permalink
vdoc: fix search in README index.html when generated with `v doc -f…
Browse files Browse the repository at this point in the history
… html -m -readme` flags (vlang#21506)
  • Loading branch information
ttytm authored May 15, 2024
1 parent 58a8fc6 commit 8a515c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/tools/vdoc/theme/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
function setupScrollSpy() {
const mainContent = document.querySelector('#main-content');
const toc = mainContent.querySelector('.doc-toc');
if (!toc) {
return;
}
const sections = mainContent.querySelectorAll('section');
const sectionPositions = Array.from(sections).map((section) => section.offsetTop);
let lastActive = null;
Expand Down

0 comments on commit 8a515c0

Please sign in to comment.