mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
fix(docs-infra): extract header attribute as title in multifile code snippets
The DocViewer component's getCodeSnippetsFromMultifileWrapper method was not
extracting the header attribute from nested <docs-code> elements, causing the
ExampleViewer to fall back to displaying file paths instead of custom headers
in tab labels.
This change adds title extraction from the header attribute when processing
multifile code snippets, ensuring that custom headers are properly displayed
in the code viewer tabs.
Fixes #64760
(cherry picked from commit 5d8b76b4fa)
This commit is contained in:
parent
81fcfe5cbc
commit
ed500e42e6
1 changed files with 1 additions and 0 deletions
|
|
@ -222,6 +222,7 @@ export class DocViewer {
|
|||
sanitizedContent: this.sanitizer.bypassSecurityTrustHtml(tab.innerHTML),
|
||||
visibleLinesRange: tab.getAttribute('visibleLines') ?? undefined,
|
||||
shell: tab.classList.contains('shell'),
|
||||
title: tab.getAttribute('header') ?? undefined,
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue