parseMarkdown() — supabase Function Reference
Architecture documentation for the parseMarkdown() function in AiPrompts.utils.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD e38a04b3_32ca_b573_96de_78cee3d3898c["parseMarkdown()"] 6335b469_2f2b_5cc5_1b82_daf325621a71["getAiPromptsImpl()"] 6335b469_2f2b_5cc5_1b82_daf325621a71 -->|calls| e38a04b3_32ca_b573_96de_78cee3d3898c 4011a8a8_98c5_15dd_836d_f64ee1d76018["getAiPromptImpl()"] 4011a8a8_98c5_15dd_836d_f64ee1d76018 -->|calls| e38a04b3_32ca_b573_96de_78cee3d3898c style e38a04b3_32ca_b573_96de_78cee3d3898c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/app/guides/getting-started/ai-prompts/[slug]/AiPrompts.utils.ts lines 17–32
function parseMarkdown(markdown: string) {
const { content: withoutFrontmatter } = matter(markdown)
const mdast = fromMarkdown(withoutFrontmatter)
let heading = ''
visit(mdast, 'heading', (node: Heading) => {
if (node.depth === 1) {
if ('value' in node.children[0]) {
heading = node.children[0].value
}
return EXIT
}
})
return { heading, content: withoutFrontmatter.trim() }
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does parseMarkdown() do?
parseMarkdown() is a function in the supabase codebase.
What calls parseMarkdown()?
parseMarkdown() is called by 2 function(s): getAiPromptImpl, getAiPromptsImpl.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free