Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit f86578b

Browse files
HermanWKeuriscrisbeto
authored andcommitted
docs-bug(Theming Angular Material): table of contents misses h2 headers
Fixed issue of h2 titles not being displayed in the table of contents Fixes #29071
1 parent ede6fb7 commit f86578b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/shared/table-of-contents/table-of-contents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export class TableOfContents implements OnInit, AfterViewInit, OnDestroy {
118118
}
119119

120120
addHeaders(sectionName: string, docViewerContent: HTMLElement, sectionIndex = 0) {
121-
const links = Array.from(docViewerContent.querySelectorAll('h3, h4'), header => {
121+
const links = Array.from(docViewerContent.querySelectorAll('h2, h3, h4'), header => {
122122
// remove the 'link' icon name from the inner text
123123
const name = (header as HTMLElement).innerText.trim().replace(/^link/, '');
124124
const {top} = header.getBoundingClientRect();

0 commit comments

Comments
 (0)