mutateAndCollapseExtraParagraphsUnderHtml() — astro Function Reference
Architecture documentation for the mutateAndCollapseExtraParagraphsUnderHtml() function in html-token-transform.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD ae279694_8174_cef4_9b86_503e9ce07415["mutateAndCollapseExtraParagraphsUnderHtml()"] b514e53d_6f58_26e2_b444_6fdf850f8be2["html-token-transform.ts"] ae279694_8174_cef4_9b86_503e9ce07415 -->|defined in| b514e53d_6f58_26e2_b444_6fdf850f8be2 e9ca3bf1_6e0d_113b_7cf1_21a7c23f6932["htmlTokenTransform()"] e9ca3bf1_6e0d_113b_7cf1_21a7c23f6932 -->|calls| ae279694_8174_cef4_9b86_503e9ce07415 d4c791f9_288b_c18a_7009_bcc35ee52e42["findExtraParagraphUnderHtml()"] ae279694_8174_cef4_9b86_503e9ce07415 -->|calls| d4c791f9_288b_c18a_7009_bcc35ee52e42 style ae279694_8174_cef4_9b86_503e9ce07415 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/markdoc/src/html/transform/html-token-transform.ts lines 179–194
function mutateAndCollapseExtraParagraphsUnderHtml(tokens: Token[]): void {
let done = false;
while (!done) {
const idx = findExtraParagraphUnderHtml(tokens);
if (typeof idx === 'number') {
// mutate
const actualChildTokens = tokens[idx + 2].children ?? [];
tokens.splice(idx, 5, ...actualChildTokens);
} else {
done = true;
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does mutateAndCollapseExtraParagraphsUnderHtml() do?
mutateAndCollapseExtraParagraphsUnderHtml() is a function in the astro codebase, defined in packages/integrations/markdoc/src/html/transform/html-token-transform.ts.
Where is mutateAndCollapseExtraParagraphsUnderHtml() defined?
mutateAndCollapseExtraParagraphsUnderHtml() is defined in packages/integrations/markdoc/src/html/transform/html-token-transform.ts at line 179.
What does mutateAndCollapseExtraParagraphsUnderHtml() call?
mutateAndCollapseExtraParagraphsUnderHtml() calls 1 function(s): findExtraParagraphUnderHtml.
What calls mutateAndCollapseExtraParagraphsUnderHtml()?
mutateAndCollapseExtraParagraphsUnderHtml() is called by 1 function(s): htmlTokenTransform.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free