Home / Function/ removeRedundantH1() — supabase Function Reference

removeRedundantH1() — supabase Function Reference

Architecture documentation for the removeRedundantH1() function in GuidesMdx.utils.tsx from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  569852a0_6fc2_34d0_9b3f_ea353f93379a["removeRedundantH1()"]
  5c8a5552_d99c_5b0d_2132_040301f438bf["getContent()"]
  5c8a5552_d99c_5b0d_2132_040301f438bf -->|calls| 569852a0_6fc2_34d0_9b3f_ea353f93379a
  ab4f49e3_ca6f_6ee7_e6ce_c61c06858edc["getContent()"]
  ab4f49e3_ca6f_6ee7_e6ce_c61c06858edc -->|calls| 569852a0_6fc2_34d0_9b3f_ea353f93379a
  59093974_e6d4_28f2_ee0c_e48bac3ddd48["getContent()"]
  59093974_e6d4_28f2_ee0c_e48bac3ddd48 -->|calls| 569852a0_6fc2_34d0_9b3f_ea353f93379a
  89e492b5_c893_2698_ebc1_ef4cd99938d7["getContent()"]
  89e492b5_c893_2698_ebc1_ef4cd99938d7 -->|calls| 569852a0_6fc2_34d0_9b3f_ea353f93379a
  style 569852a0_6fc2_34d0_9b3f_ea353f93379a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/features/docs/GuidesMdx.utils.tsx lines 195–207

function removeRedundantH1(content: string) {
  const mdxTree = fromMarkdown(content, 'utf-8', {
    extensions: [gfm()],
    mdastExtensions: [gfmFromMarkdown()],
  })

  const maybeH1 = mdxTree.children[0]
  if (maybeH1 && maybeH1.type === 'heading' && maybeH1.depth === 1) {
    content = content.slice(maybeH1.position?.end?.offset)
  }

  return content
}

Subdomains

Frequently Asked Questions

What does removeRedundantH1() do?
removeRedundantH1() is a function in the supabase codebase.
What calls removeRedundantH1()?
removeRedundantH1() is called by 4 function(s): getContent, getContent, getContent, getContent.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free