mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(docs-infra): extract only the visibleRegion
Previously we extracted the regions and only made the visible region visible on the page, but since there is not a need for the
non-visible code to be presented, we don't need to include it in the generated code snippets.
(cherry picked from commit 9b3b5fb4cf)
This commit is contained in:
parent
e95d2e3a34
commit
76f784c340
1 changed files with 1 additions and 3 deletions
|
|
@ -24,8 +24,6 @@ export function extractRegions(token: CodeToken) {
|
|||
if (!region) {
|
||||
throw new Error(`Cannot find ${token.visibleRegion} in ${token.path}!`);
|
||||
}
|
||||
token.visibleLines = `[${region.ranges.map(
|
||||
(range) => `[${range.from}, ${range.to ?? parsedRegions.totalLinesCount + 1}]`,
|
||||
)}]`;
|
||||
token.code = region.lines.join('\n');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue