From ed500e42e60be26ce1d271ffe2b70a86b7153e6d Mon Sep 17 00:00:00 2001 From: Shuaib Hasan Akib Date: Wed, 29 Oct 2025 22:25:46 +0600 Subject: [PATCH] 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 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 5d8b76b4fad33c9aa82e505e1c76c88abc02527c) --- .../components/viewers/docs-viewer/docs-viewer.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/adev/shared-docs/components/viewers/docs-viewer/docs-viewer.component.ts b/adev/shared-docs/components/viewers/docs-viewer/docs-viewer.component.ts index 76717c25830..964af1d478b 100644 --- a/adev/shared-docs/components/viewers/docs-viewer/docs-viewer.component.ts +++ b/adev/shared-docs/components/viewers/docs-viewer/docs-viewer.component.ts @@ -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, })); }