Open bharatrajagopalan opened 3 years ago
@bharatrajagopalan thank you for the report! hmm... that's really not good. To generate the TOC itself I use mdast-util-toc
this itself uses then github-slugger
for the slug-generation. The gatsby-remark-autolink-headers
uses also github-slugger
. Did you do any research where the difference could come from?
@signalwerk
I managed to work out a few bits.I am using the Gatsby carbon theme https://gatsby-theme-carbon.now.sh
I am trying to work out what it uses internally, but it is highly likely that it doesn't use gatsby-remark-autolink-headers
I installed gatsby-remark-autolink-headers
on top and it basically resulted in additional ids prefixed with object-
From your perspective given that the gatsby-remark-table-contents
is designed to work with gatsby-remark-autolink-headers
as a pre-requisite, arguably this is beyond your scope to fix. If you agree then I will close this issue accordingly.
Dots and ampersands are rendered differently in TOC compared to Gatsby
A.B help
Gatsby generated link #a.b-help TOC generated link: #ab-help
missing the
.
A & B help
Gatsby converts
&
toand
while TOC just ignores itGatsby link: #a-and-b-help TOC link: #a--b-help