Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(Docs): Make code tags sync generated (#43282)

Jeremias Menichellif5667ac45077
diff --git a/apps/docs/features/docs/MdxBase.shared.tsx b/apps/docs/features/docs/MdxBase.shared.tsx
index 7c82b3a5d56..3502b92392d 100644
--- a/apps/docs/features/docs/MdxBase.shared.tsx
+++ b/apps/docs/features/docs/MdxBase.shared.tsx
@@ -96,6 +96,13 @@ const components = {
</Heading>
),
pre: CodeBlock,
+ /**
+ * Force inline code tags to go sync, this prevents Heading anchor resolution fail due to
+ * our CodeBlock component being async. We need to find a better solution for more future
+ * proof MDX rendering. Definitely improving the anchors utility in the ui/Heading component
+ * plus having a more resilient highlighting strategy.
+ */
+ code: (props: any) => <code {...props}>{props.children}</code>,
Price,
}