Closed
Description
In #58 support was added to include phrasing content. Unfortunately, we sometimes might not always want this behavior.
My use case
I'm using gatsby-remark-table-of-contents
on a personal blog which uses mdast-util-toc
under the covers. I would sometimes like to include images (custom React components in my MDX) in the headings, but I would NOT want to extract these into the table of contents. Currently my MDX looks like:
### Never Pause Here <Chrome />
When you right-click the gutter and select "Never Pause Here," Chrome creates a conditional breakpoint that is `false` and never passes. This makes it so that the debugger will never pause on this line.
This creates a TOC entry that is just literally the string "Never Pause Here <Chrome />"
when I would like it to be "Never Pause Here"
.
It would be lovely if including phrasing content was an option that I could opt-out of.