Allow to choose preserved-case or lower-case for generating anchor link
See original GitHub issueWhat is the Problem
Due to #312 getting merged, it seems that the TOC anchors are now broken in GitHub Enterprise, at least on version 2.15.6. If I change all the links to lowercase, the TOC links appropriately.
How to reproduce it
The following is how v2.4.0 generates the TOC:
# Section One
- [Section One](#Section-One)
- [Sub Section One](#Sub-Section-One)
- [Sub Section Two](#Sub-Section-Two)
## Sub Section One
## Sub Section Two
None of the anchors work in GitHub Enterprise v2.15.6 for both Chromium or Firefox (the two browsers I have). I have not tested this in GitHub, but I’m assuming it works based on why #312 was merged.
The following TOC does work and link correctly:
# Section One
- [Section One](#section-one)
- [Sub Section One](#sub-section-one)
- [Sub Section Two](#sub-section-two)
## Sub Section One
## Sub Section Two
I have no idea if the toc support for mixed case anchors was updated in the later versions of GHE, I think the latest version is 2.17 so we’re not that far behind latest. Perhaps someone that uses a later version of GHE could test?
In the past there used to be a setting: markdown.extension.toc.toLowerCase that forced all the links to be lowercase, I think it may have been removed because it broke some languages but at least we could configure the link being as-is or force it to be lowercase.
Any chance to add this back into the configuration, otherwise I might as well not update the plugin past 1.5.6.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:11 (4 by maintainers)

Top Related StackOverflow Question
Thanks for the feedback. Things are a little complex here because there are many more differences between different places (VSCode, GitHub, and now GitHub Enterprise, Hugo).
For a workaround, you can install the previous build as @parsiya mentioned (thanks!). Remember to disable extension auto-update in the
settings.jsonfirst.I will consider adding a new option this weekend. (related #469)
There’s no need to disable auto-updates. Seems like VS Code disables auto-update if you install a specific version of the extension. Instead of downloading and installing the VSIX you can (see here https://github.com/microsoft/vscode/issues/30579#issuecomment-456028574):
Install Another Version....2.3.1.