-
Notifications
You must be signed in to change notification settings - Fork 49
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
Table of contents link does not work when headers contain special characters #36
Labels
bug
Something isn't working
Comments
Thanks for reporting the bug I will take a look as soon as I can. |
didix21
added a commit
that referenced
this issue
Jun 21, 2020
didix21
added a commit
that referenced
this issue
Jun 21, 2020
didix21
added a commit
that referenced
this issue
Jun 21, 2020
…t-work- Fix #36: Delete special characters when creating toc links
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Headers in markdown have an anchor which is used for links, format is '#' then the header text converted to lower-case, spaces replaced with hyphens, and special characters removed.
The Table of Contents in MdUtils has a link to the header by converting to lower-case and replacing spaces with hyphens, but does not remove special characters. This means that some of the links in the ToC will not work.
For example I have a header level 2, with text "Unnamed: 41", when I create a ToC the link to this is #unnamed:-41, but should be #unnamed-41, i.e. without the colon. Clicking on the link does not take me to the header section of the document as it should do..
The text was updated successfully, but these errors were encountered: