Skip to content

Commit 44326ca

Browse files
authored
fix: include h6 headings in heading element selection (#2649)
1 parent 44ec7cf commit 44326ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/event/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function Events(Base) {
7676
* @void
7777
*/
7878
#initHeadings() {
79-
const headingElms = dom.findAll('#main :where(h1, h2, h3, h4, h5)');
79+
const headingElms = dom.findAll('#main :where(h1, h2, h3, h4, h5, h6)');
8080
const headingsInView = new Set();
8181
let isInitialLoad = true;
8282

@@ -361,7 +361,7 @@ export function Events(Base) {
361361
// Anchor link
362362
if (query.id) {
363363
const headingElm = dom.find(
364-
`.markdown-section :where(h1, h2, h3, h4, h5)[id="${query.id}"]`,
364+
`.markdown-section :where(h1, h2, h3, h4, h5, h6)[id="${query.id}"]`,
365365
);
366366

367367
if (headingElm) {

0 commit comments

Comments
 (0)