-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distill TOC not working with special characters (e.g. ', ?) #489
Comments
@LoryPack, thanks for raising this issue. do you mind testing something quick for me in your blog? if you edit |
Hello, thanks for that. I have tried what you suggest, but if you do that no link in TOC works! I realized the issue in the first place is not due to the links in TOC. In fact, if I remove the TOC from the blog post, still the links with # go to the right section, except for the ones in which a "?" or " ' " appear. For instance, in my example, going to goes to the right section, while http://www.lorenzopacchiardi.me/blog/2021/generalizedBayes/#so-what-is-wrong? does not, even if no TOC is present. |
Seems to be working now, thanks a lot! |
Acknowledge the following
[For usage questions, please post in the Discussions instead of raising an issue.]
Describe the bug
I have added the TOC to my distill blog posts, following #470. That works fine. However, if the section or subsection contain special characters (as for instance apostrophe ' or question mark ?), the links in the table of contents do not work.
To Reproduce
Steps to reproduce the behavior:
Simply create a distill blog post, add a section with a question mark and add it to the TOC.
An example is present in my blog post here. See also the source code on Github here.
Expected behavior
TOC link should work.
System (please complete the following information):
The text was updated successfully, but these errors were encountered: