From 76f784c340337263e04d7b7bfdb40ffd66c257e1 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Fri, 21 Nov 2025 19:33:16 +0000 Subject: [PATCH] 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 9b3b5fb4cf498f0d4783a847783b5664a8ac78da) --- .../shared/marked/extensions/docs-code/format/region.mts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/format/region.mts b/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/format/region.mts index e47d5e5afe1..ef6656907f8 100644 --- a/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/format/region.mts +++ b/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/format/region.mts @@ -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'); } }