Skip to content

Commit c13e559

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 fcfeee5 commit c13e559

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

material.angular.io/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)