Skip to content

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

Fix custom anchors

Terry Sutton7faa2df7cada
diff --git a/apps/docs/components/CustomHTMLElements/Heading.tsx b/apps/docs/components/CustomHTMLElements/Heading.tsx
index 74f3511b110..9d427e79b99 100644
--- a/apps/docs/components/CustomHTMLElements/Heading.tsx
+++ b/apps/docs/components/CustomHTMLElements/Heading.tsx
@@ -25,9 +25,10 @@ interface Props {
* expected tocList format (text, link,level).
*
* In tsx files, we can generate this tocList directly. For these files, we don't
- * need to parse the <a> and generate anchors
+ * need to parse the <a> and generate anchors. Custom anchors are used in tsx files.
+ * (see: /pages/reference/cli/config.tsx)
*/
-const Heading: React.FC<Props> = ({ tag, parseAnchors = false, customAnchor, children }) => {
+const Heading: React.FC<Props> = ({ tag, customAnchor, children }) => {
const HeadingTag = `${tag}` as any
const anchor = customAnchor ? customAnchor : getAnchor(children)
const link = `#${anchor}`
@@ -43,7 +44,7 @@ const Heading: React.FC<Props> = ({ tag, parseAnchors = false, customAnchor, chi
return (
<HeadingTag id={anchor} ref={ref} className="group scroll-mt-24">
- {parseAnchors ? removeAnchor(children) : children}
+ {removeAnchor(children)}
{anchor && (
<a href={link} className="ml-2 opacity-0 group-hover:opacity-100 transition">
#