rewriteNodes() — supabase Function Reference
Architecture documentation for the rewriteNodes() function in CodeTabs.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 5ff6f4ae_9c54_d590_6f0e_af17d0a33505["rewriteNodes()"] e3ce9f7c_a141_fd4b_becc_9bb3c1ead858["codeTabsRemark()"] e3ce9f7c_a141_fd4b_becc_9bb3c1ead858 -->|calls| 5ff6f4ae_9c54_d590_6f0e_af17d0a33505 beb19324_0ee7_c826_cdeb_54c57d864501["rewriteNodes()"] 5ff6f4ae_9c54_d590_6f0e_af17d0a33505 -->|calls| beb19324_0ee7_c826_cdeb_54c57d864501 fdae4bbb_3776_b33c_7f46_40fd03b9ce28["replaceCodeTabs()"] 5ff6f4ae_9c54_d590_6f0e_af17d0a33505 -->|calls| fdae4bbb_3776_b33c_7f46_40fd03b9ce28 980d4412_8b58_ac59_575e_1d9c72e1d262["nameCodeBlock()"] 5ff6f4ae_9c54_d590_6f0e_af17d0a33505 -->|calls| 980d4412_8b58_ac59_575e_1d9c72e1d262 style 5ff6f4ae_9c54_d590_6f0e_af17d0a33505 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/features/directives/CodeTabs.ts lines 35–54
function rewriteNodes(tree: Root) {
visitParents(
tree,
['mdxJsxFlowElement', 'code'],
(node: MdxJsxFlowElement | Code, ancestors: Array<Parent>) => {
if (node.type === 'mdxJsxFlowElement') {
if (node.name !== '$CodeTabs') {
return
} else {
replaceCodeTabs(node, ancestors)
// Code blocks inside CodeTabs are handled with CodeTabs, so ignore
// them here
return SKIP
}
} else {
nameCodeBlock(node, ancestors)
}
}
)
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does rewriteNodes() do?
rewriteNodes() is a function in the supabase codebase.
What does rewriteNodes() call?
rewriteNodes() calls 3 function(s): nameCodeBlock, replaceCodeTabs, rewriteNodes.
What calls rewriteNodes()?
rewriteNodes() is called by 1 function(s): codeTabsRemark.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free