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 and generate anchors + * need to parse the and generate anchors. Custom anchors are used in tsx files. + * (see: /pages/reference/cli/config.tsx) */ -const Heading: React.FC = ({ tag, parseAnchors = false, customAnchor, children }) => { +const Heading: React.FC = ({ 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 = ({ tag, parseAnchors = false, customAnchor, chi return ( - {parseAnchors ? removeAnchor(children) : children} + {removeAnchor(children)} {anchor && ( #