rewriteNodes() — supabase Function Reference
Architecture documentation for the rewriteNodes() function in Partial.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD f759d72f_4789_4f16_671d_55f55b4a2ad9["rewriteNodes()"] e170640f_c973_07c3_1dca_4410298488e1["partialsRemark()"] e170640f_c973_07c3_1dca_4410298488e1 -->|calls| f759d72f_4789_4f16_671d_55f55b4a2ad9 c4e99cf4_74d4_e55a_d410_f70700102bee["validateVariables()"] f759d72f_4789_4f16_671d_55f55b4a2ad9 -->|calls| c4e99cf4_74d4_e55a_d410_f70700102bee e11920c8_cc89_8ce7_7817_2d80408d3b7b["substituteVars()"] f759d72f_4789_4f16_671d_55f55b4a2ad9 -->|calls| e11920c8_cc89_8ce7_7817_2d80408d3b7b 144ada00_745c_00aa_a623_64d9cca6bb96["fromDocsMarkdown()"] f759d72f_4789_4f16_671d_55f55b4a2ad9 -->|calls| 144ada00_745c_00aa_a623_64d9cca6bb96 style f759d72f_4789_4f16_671d_55f55b4a2ad9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/features/directives/Partial.ts lines 195–205
function rewriteNodes(
contentMap: Map<MdxJsxFlowElement, [Parent, string, undefined | Record<string, string>, string]>
) {
for (const [node, [parent, rawContent, vars, partialPath]] of contentMap) {
const trimmedContent = rawContent.trim()
validateVariables(trimmedContent, vars, partialPath)
let content = substituteVars(trimmedContent, vars)
const replacementContent = fromDocsMarkdown(content)
parent.children.splice(parent.children.indexOf(node), 1, replacementContent)
}
}
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): fromDocsMarkdown, substituteVars, validateVariables.
What calls rewriteNodes()?
rewriteNodes() is called by 1 function(s): partialsRemark.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free