At first I thought it was an issue with Pandoc not supporting the correct algorithm even for GFM, but in fact I misunderstood how the auto identifier feature works.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
This is from an investigation following a question on Community
https://community.rstudio.com/t/github-document-table-of-contents-links-not-working-for-sections-that-begin-with-numbers/95539/3
At first I thought it was an issue with Pandoc not supporting the correct algorithm even for GFM, but in fact I misunderstood how the auto identifier feature works.
From this anwser on Pandoc dicussion, it seems that the auto identifier creation happens at read time, not write time. This seems counter intuitive but I put theses files togther in this gist: https://gist.github.com/cderv/589912cb000347cf6d22e91adfa852bc
As you see, not providing
markdown+gfm_auto_identifierswill not produce the correct identifiers to work in the TOC for Pandoc autolink feature.This means this works
and this will produce a non working TOC
I think we should set the extension in rmarkdown if
toc = TRUEThe text was updated successfully, but these errors were encountered: