mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The ExampleViewer component was extracting only innerHTML from code
blocks in multifile examples, which lost the shell class applied by
the formatCode function. This caused the $ prompt to not appear for
shell commands in multifile blocks even when language="shell" was set.
Modified the Snippet interface to track shell language state and
updated getCodeSnippetsFromMultifileWrapper and getStandaloneCodeSnippet
methods to preserve the shell class. Updated example-viewer template
to conditionally apply the shell class to the code wrapper element.
Fixes inconsistency between standalone and multifile shell code blocks.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| api-gen | ||
| examples | ||
| guides | ||
| navigation | ||
| shared | ||
| tutorials | ||
| _guides.bzl | ||
| _navigation.bzl | ||
| _playground.bzl | ||
| _previews.bzl | ||
| _stackblitz.bzl | ||
| _tutorial.bzl | ||
| _zip.bzl | ||
| BUILD.bazel | ||
| esbuild.config.mjs | ||