From b69af534f5a3b68a202e6a676222333091f7f603 Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Mon, 15 Dec 2025 17:50:32 +0800 Subject: [PATCH] fix: include h6 headings in heading element selection --- src/core/event/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/event/index.js b/src/core/event/index.js index 9d7a1b3b1..f92c38e5b 100644 --- a/src/core/event/index.js +++ b/src/core/event/index.js @@ -76,7 +76,7 @@ export function Events(Base) { * @void */ #initHeadings() { - const headingElms = dom.findAll('#main :where(h1, h2, h3, h4, h5)'); + const headingElms = dom.findAll('#main :where(h1, h2, h3, h4, h5, h6)'); const headingsInView = new Set(); let isInitialLoad = true; @@ -361,7 +361,7 @@ export function Events(Base) { // Anchor link if (query.id) { const headingElm = dom.find( - `.markdown-section :where(h1, h2, h3, h4, h5)[id="${query.id}"]`, + `.markdown-section :where(h1, h2, h3, h4, h5, h6)[id="${query.id}"]`, ); if (headingElm) {