taxonomy icon indicating copy to clipboard operation
taxonomy copied to clipboard

rehypeAutolinkHeadings doesn't wrap the heading text

Open FranciscoMoretti opened this issue 2 years ago • 1 comments

subheadings titles don't have a link because the anchor tag doesn't wrap the text of the titles.

When there is no heading component in mdx.tsx (e.g. h2), rehypeAutolinkHeadings works as expected. It seems that the transformation that's performed in mdx.tsx is not compatible with the contentlayer rehype plugin.

More info https://github.com/rehypejs/rehype-autolink-headings/issues/15

FranciscoMoretti avatar Apr 14 '23 11:04 FranciscoMoretti

It turns out that the fix was quite simple actually https://github.com/shadcn/taxonomy/pull/96

FranciscoMoretti avatar Apr 14 '23 19:04 FranciscoMoretti