[gatsby-transformer-remark] Add a way to get AST of Table of contents #25152
Labels
topic: remark/mdx
Related to Markdown, remark & MDX ecosystem
type: feature or enhancement
Issue that is not a bug and requests the addition of a new feature or enhancement.
Summary
Adding a way to get AST of Table of contents just like the htmlAst property.
Basic example
Motivation
When a user using htmlAst to customize the output DOM, they may want to access the AST of the table of contents too.
In my case, I'm using the htmlAst with
rehype-react
. When I want to add functionality to the table of contents, like emphasizing the header which a user is reading. It's very convenient if I can get the AST of the table of contents.The text was updated successfully, but these errors were encountered: