Extension not slugifying anchors properly
Thanks for maintaining this extension. It's been great to work with but a couple of issues popped up recently.
With the version and settings at the end of this issue, it's producing the following markdown.
<a id="markdown-On-boarding%20Users" name="On-boarding%20Users"></a>
# On-boarding Users
These instructions cover on-boarding (and off-boarding) tech team users.
<!-- TOC -->
* [Common Access](#markdown-header-common-access)
<!-- /TOC -->
<a id="markdown-Common%20Access" name="Common%20Access"></a>
## Common Access
...
Issues
- The TOC link
#markdown-header-common-accessdoesn't match the section anchor idmarkdown-Common%20Accessor nameCommon%20Access. The anchors need to be slugified properly so the link works. "markdown-toc.depthFrom": 2is set but an anchor is still produced for# On-boarding Users
Extension version: 3.0.5
Settings:
"markdown-toc.anchorMode": "bitbucket.org",
"markdown-toc.bulletCharacter": "*",
"markdown-toc.depthFrom": 2,
"markdown-toc.depthTo": 3,
"markdown-toc.insertAnchor": true
I reverted to version 3.0.1 and the anchors are slugified properly in that version.
The reason for this is because I use a new mechanism to generate anchor id and name attributes to address some problems with non-ASCII characters.
A special replacement for whitespace added int commit e69a9dfc8dd4a25dd7e7fc97b4dd44ab79024a56
Live in preview version 3.0.6
Still, the slugified anchor names do not match the URL fragments generated in the TOC. One is a mixture of lowercase and uppercase characters while the other is all in lowercase.
May I ask why they have to be different in the casing?
Still, the slugified anchor names do not match the URL fragments generated in the TOC. One is a mixture of lowercase and uppercase characters while the other is all in lowercase.
May I ask why they have to be different in the casing?
Because they're using 2 different mechanisms for creating slugify. I will look into this when I have more time